Index: /Updater/Updater.sln
===================================================================
--- /Updater/Updater.sln (revision 711)
+++ /Updater/Updater.sln (revision 711)
@@ -0,0 +1,20 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Updater", "Updater.csproj", "{B8DCD30C-ED1D-4DBE-AAD0-4ACF17959090}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{B8DCD30C-ED1D-4DBE-AAD0-4ACF17959090}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B8DCD30C-ED1D-4DBE-AAD0-4ACF17959090}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B8DCD30C-ED1D-4DBE-AAD0-4ACF17959090}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B8DCD30C-ED1D-4DBE-AAD0-4ACF17959090}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: /Updater/Updater.csproj.user
===================================================================
--- /Updater/Updater.csproj.user (revision 711)
+++ /Updater/Updater.csproj.user (revision 711)
@@ -0,0 +1,5 @@
+﻿<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <StartArguments>1</StartArguments>
+  </PropertyGroup>
+</Project>
Index: /Updater/Updater.csproj
===================================================================
--- /Updater/Updater.csproj (revision 711)
+++ /Updater/Updater.csproj (revision 711)
@@ -0,0 +1,89 @@
+﻿<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.50727</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{B8DCD30C-ED1D-4DBE-AAD0-4ACF17959090}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Updater</RootNamespace>
+    <AssemblyName>Updater</AssemblyName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="UpdateForm.resx">
+      <SubType>Designer</SubType>
+      <DependentUpon>UpdateForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+    <Compile Include="UpdateForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="UpdateForm.Designer.cs">
+      <DependentUpon>UpdateForm.cs</DependentUpon>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <COMReference Include="Shell32">
+      <Guid>{50A7E9B0-70EF-11D1-B75A-00A0C90564FE}</Guid>
+      <VersionMajor>1</VersionMajor>
+      <VersionMinor>0</VersionMinor>
+      <Lcid>0</Lcid>
+      <WrapperTool>tlbimp</WrapperTool>
+      <Isolated>False</Isolated>
+      <Private>False</Private>
+    </COMReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: /Updater/UpdateForm.resx
===================================================================
--- /Updater/UpdateForm.resx (revision 711)
+++ /Updater/UpdateForm.resx (revision 711)
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="buttonCancel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        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
+</value>
+  </data>
+  <metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
Index: /Updater/UpdateForm.Designer.cs
===================================================================
--- /Updater/UpdateForm.Designer.cs (revision 711)
+++ /Updater/UpdateForm.Designer.cs (revision 711)
@@ -0,0 +1,113 @@
+namespace Updater
+{
+    partial class UpdateForm
+    {
+
+		#region Fields (5) 
+
+        private System.ComponentModel.BackgroundWorker backgroundWorker1;
+        private System.Windows.Forms.Button buttonCancel;
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.ProgressBar progressBar1;
+
+		#endregion Fields 
+
+		#region Methods (1) 
+
+
+		// Protected Methods (1) 
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+
+		#endregion Methods 
+
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UpdateForm));
+            this.buttonCancel = new System.Windows.Forms.Button();
+            this.progressBar1 = new System.Windows.Forms.ProgressBar();
+            this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
+            this.label1 = new System.Windows.Forms.Label();
+            this.SuspendLayout();
+            // 
+            // buttonCancel
+            // 
+            this.buttonCancel.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+            this.buttonCancel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+            this.buttonCancel.Image = ((System.Drawing.Image)(resources.GetObject("buttonCancel.Image")));
+            this.buttonCancel.Location = new System.Drawing.Point(200, 93);
+            this.buttonCancel.Name = "buttonCancel";
+            this.buttonCancel.Size = new System.Drawing.Size(121, 40);
+            this.buttonCancel.TabIndex = 11;
+            this.buttonCancel.Text = "Anuluj";
+            this.buttonCancel.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
+            this.buttonCancel.UseVisualStyleBackColor = true;
+            this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
+            // 
+            // progressBar1
+            // 
+            this.progressBar1.Location = new System.Drawing.Point(25, 31);
+            this.progressBar1.Name = "progressBar1";
+            this.progressBar1.Size = new System.Drawing.Size(470, 23);
+            this.progressBar1.TabIndex = 10;
+            // 
+            // backgroundWorker1
+            // 
+            this.backgroundWorker1.WorkerReportsProgress = true;
+            this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker1_DoWork);
+            this.backgroundWorker1.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker1_RunWorkerCompleted);
+            this.backgroundWorker1.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.backgroundWorker1_ProgressChanged);
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(22, 68);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(35, 13);
+            this.label1.TabIndex = 12;
+            this.label1.Text = "label1";
+            // 
+            // UpdateForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(524, 155);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.buttonCancel);
+            this.Controls.Add(this.progressBar1);
+            this.Name = "UpdateForm";
+            this.Text = "Aktualizcja - Baza zamówieñ | Baza premii";
+            this.Shown += new System.EventHandler(this.UpdateForm_Shown);
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.UpdateForm_FormClosing);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+    }
+}
Index: /Updater/UpdateForm.cs
===================================================================
--- /Updater/UpdateForm.cs (revision 711)
+++ /Updater/UpdateForm.cs (revision 711)
@@ -0,0 +1,245 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using System.Net;
+using System.IO;
+using System.Diagnostics;
+using System.Data.SqlClient;
+
+namespace Updater
+{
+    public partial class UpdateForm : Form
+    {
+
+		#region Fields (7) 
+
+        private bool abort = false;
+     //   private string connectionString;
+        private string zipFileName;
+        private string exeFileName;
+        private bool isBusy = false;
+        private int nMaxProgress = 100;
+        private string strUrl;
+        private WebClient webClient;
+
+		#endregion Fields 
+
+		#region Constructors (1) 
+
+        public UpdateForm(string rodzajProgramu)
+        {
+            InitializeComponent();
+
+            switch (rodzajProgramu){
+                //BAZA REKLAM
+                case "1":
+                    strUrl = "http://www.infocity.pl/baza_reklam/Files/BazaReklam.zip";
+                    zipFileName = "BazaReklam";
+                    exeFileName = "Baza Reklam";
+                    this.Text = "Baza reklam - aktualizacja";
+                    break;
+                //BAZA ZAMOWIEN - BAZA PREMII
+                case "2":
+                    strUrl = "http://www.infocity.pl/baza_zamowien/Files/BazaZamowien.zip";
+                    zipFileName = "BazaZamowien";
+                    exeFileName = "BazaZamowien";
+                    this.Text = "Baza zamówieñ | Baza premii - aktualizacja";
+                    break;
+            }
+            
+         //   connectionString = connStr;                  
+      
+            webClient = new WebClient();
+            webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(DownloadFileCompleted);
+            webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(DownloadProgressChanged);
+        }
+
+		#endregion Constructors 
+
+		#region Methods (9) 
+
+
+		// Private Methods (9) 
+
+        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
+        {
+            try
+            {
+                Extract(Environment.CurrentDirectory + "\\" + zipFileName + ".zip", Environment.CurrentDirectory);
+                MessageBox.Show("Zakoñczono aktualizacjê oprogramowania.", "Aktualizacja oprogramowania", MessageBoxButtons.OK, MessageBoxIcon.Information);
+                System.Diagnostics.Process.Start(exeFileName + ".exe");
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.Message, "Aktualizacja oprogramowania", MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+
+            isBusy = false;
+        }
+
+        private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
+        {
+            if (!this.Visible || this.WindowState != FormWindowState.Normal)
+            {
+                return;
+            }
+
+            if (progressBar1.Maximum != nMaxProgress)
+            {
+                progressBar1.Maximum = nMaxProgress;
+            }
+
+            if (e.ProgressPercentage < progressBar1.Maximum)
+            {
+                progressBar1.Value = e.ProgressPercentage;
+            }
+        }
+
+        private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
+        {
+            this.Close();
+        }
+
+        private void buttonCancel_Click(object sender, EventArgs e)
+        {
+            isBusy = false;
+            abort = true;
+            webClient.CancelAsync();
+            this.Close();
+        }
+
+        private void DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
+        {
+            isBusy = false;
+            
+            if (abort)
+            {
+                return;
+            }
+
+            if (e.Error == null)
+            {
+                progressBar1.Value = 0;
+
+                if (File.Exists(exeFileName + ".exe"))
+                {
+                    File.Delete(exeFileName + ".exe");
+                }
+
+               //if (File.Exists(
+               // File.Move(exeFileName + ".exe",exeFileName + ".old");
+
+                label1.Text = "Rozpakowywanie archiwum...";              
+                backgroundWorker1.RunWorkerAsync();
+            }
+            else
+            {
+                MessageBox.Show("B³¹d aktualizacji oprogramowania: " + e.Error.Message, "Aktualizacja oprogramowania", MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        private void DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
+        {
+            progressBar1.Value = e.ProgressPercentage;
+        }
+
+        private void Extract(string zipFileName, string destinationPath)
+        {
+            
+            Shell32.IShellDispatch4 sc = (Shell32.IShellDispatch4) new Shell32.ShellClass();
+           
+           // Shell32.ShellClass sc = new Shell32.ShellClass();
+            Shell32.Folder SrcFlder = sc.NameSpace(zipFileName);
+            Shell32.Folder DestFlder = sc.NameSpace(destinationPath);
+            Shell32.FolderItems items = SrcFlder.Items();
+            nMaxProgress = items.Count;
+          //  DestFlder.CopyHere(items, 20);
+           
+            int n = 0;
+
+            foreach (Shell32.FolderItem item in items)
+            {
+                DestFlder.CopyHere(item, 20);
+                
+                ++n;
+                if (backgroundWorker1.IsBusy) backgroundWorker1.ReportProgress(n);
+            }
+            
+            
+            //Type shellAppType = Type.GetTypeFromProgID("Shell.Application"); 
+            //object shell = Activator.CreateInstance(shellAppType);
+            //object srcFlder = shell.GetType().InvokeMember(
+            //object destFlder = Type.GetTypeFromProgID("Shell.Folder");
+             
+        }
+
+        private void UpdateForm_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            if (isBusy || backgroundWorker1.IsBusy)
+            {
+                e.Cancel = true;
+            }
+        }
+
+        private void UpdateForm_Shown(object sender, EventArgs e)
+        {
+            try
+            {
+                /*
+                string connectionString = "Data Source=10.0.0.21;Initial Catalog=DANE_OGL_SQL;Persist Security Info=True;User ID=sa;Password=maro2451;Connection Timeout=600;Application Name=boUpdater";
+
+                SqlConnection conn = new SqlConnection(connectionString);
+                conn.Open();
+
+                SqlCommand cmd = conn.CreateCommand();
+                cmd.CommandText = "SELECT TOP 1 currVer FROM Config";
+                string verDb = (string)cmd.ExecuteScalar();
+                conn.Close();
+
+                string s1 = Environment.CurrentDirectory;
+                s1 += "\\BazaOgl.exe";
+                FileVersionInfo boFileVersion = FileVersionInfo.GetVersionInfo(s1);
+
+                if (verDb == boFileVersion.FileVersion)
+                {
+                    if (MessageBox.Show("Bie¿¹ca wersja pliku (" + verDb + ") jest aktualna.\nCzy napewno chcesz aktualizowaæ program?", "Aktualizacja oprogramowania", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)
+                        return;
+                }
+                */
+
+                isBusy = true;
+                this.progressBar1.Value = 0;
+                string s1 = Environment.CurrentDirectory;
+                s1 += "\\" + zipFileName + ".zip";
+
+                if (System.IO.File.Exists(s1))
+                {
+                    System.IO.File.Delete(s1);
+                }
+
+                webClient.DownloadFileAsync(new Uri(strUrl), s1);
+                label1.Text = "Pobieranie nowej wersji";
+            }
+            catch (UriFormatException ex)
+            {
+                MessageBox.Show(ex.Message, "Aktualizacja oprogramowania", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                Close();
+            }
+            catch (Exception ex)
+            {
+                //MessageBox.Show(ex.Message, "Aktualizacja oprogramowania", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                MessageBox.Show(ex.ToString(), "Aktualizacja oprogramowania", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                Close();
+            }
+
+        }
+
+
+		#endregion Methods 
+
+    }
+}
Index: /Updater/Program.cs
===================================================================
--- /Updater/Program.cs (revision 711)
+++ /Updater/Program.cs (revision 711)
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+
+namespace Updater
+{
+    static class Program
+    {
+
+		#region Methods (1) 
+
+
+		// Private Methods (1) 
+
+        /// <summary>
+        /// The main entry point for the application.
+        /// </summary>
+        [STAThread]
+        static void Main(string[] arg)
+        {
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new UpdateForm(arg[0]));
+        }
+
+
+		#endregion Methods 
+
+    }
+}
Index: /Updater/Properties/AssemblyInfo.cs
===================================================================
--- /Updater/Properties/AssemblyInfo.cs (revision 711)
+++ /Updater/Properties/AssemblyInfo.cs (revision 711)
@@ -0,0 +1,33 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Updater")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HP")]
+[assembly: AssemblyProduct("Updater")]
+[assembly: AssemblyCopyright("Copyright © HP 2008")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("cf09f71e-8c3d-4a14-a8a4-161436545b4c")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: /Updater/Properties/Settings.settings
===================================================================
--- /Updater/Properties/Settings.settings (revision 711)
+++ /Updater/Properties/Settings.settings (revision 711)
@@ -0,0 +1,7 @@
+﻿<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>
Index: /Updater/Properties/Settings.Designer.cs
===================================================================
--- /Updater/Properties/Settings.Designer.cs (revision 711)
+++ /Updater/Properties/Settings.Designer.cs (revision 711)
@@ -0,0 +1,39 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.1433
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Updater.Properties
+{
+
+
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+
+		#region Fields (1) 
+
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+		#endregion Fields 
+
+		#region Properties (1) 
+
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+
+		#endregion Properties 
+
+    }
+}
Index: /Updater/Properties/Resources.resx
===================================================================
--- /Updater/Properties/Resources.resx (revision 711)
+++ /Updater/Properties/Resources.resx (revision 711)
@@ -0,0 +1,117 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<root>
+	<!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+	<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+		<xsd:element name="root" msdata:IsDataSet="true">
+			<xsd:complexType>
+				<xsd:choice maxOccurs="unbounded">
+					<xsd:element name="metadata">
+						<xsd:complexType>
+							<xsd:sequence>
+								<xsd:element name="value" type="xsd:string" minOccurs="0" />
+							</xsd:sequence>
+							<xsd:attribute name="name" type="xsd:string" />
+							<xsd:attribute name="type" type="xsd:string" />
+							<xsd:attribute name="mimetype" type="xsd:string" />
+						</xsd:complexType>
+					</xsd:element>
+					<xsd:element name="assembly">
+						<xsd:complexType>
+							<xsd:attribute name="alias" type="xsd:string" />
+							<xsd:attribute name="name" type="xsd:string" />
+						</xsd:complexType>
+					</xsd:element>
+					<xsd:element name="data">
+						<xsd:complexType>
+							<xsd:sequence>
+								<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+								<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+							</xsd:sequence>
+							<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+							<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+							<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+						</xsd:complexType>
+					</xsd:element>
+					<xsd:element name="resheader">
+						<xsd:complexType>
+							<xsd:sequence>
+								<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+							</xsd:sequence>
+							<xsd:attribute name="name" type="xsd:string" use="required" />
+						</xsd:complexType>
+					</xsd:element>
+				</xsd:choice>
+			</xsd:complexType>
+		</xsd:element>
+	</xsd:schema>
+	<resheader name="resmimetype">
+		<value>text/microsoft-resx</value>
+	</resheader>
+	<resheader name="version">
+		<value>2.0</value>
+	</resheader>
+	<resheader name="reader">
+		<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+	</resheader>
+	<resheader name="writer">
+		<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+	</resheader>
+</root>
Index: /Updater/Properties/Resources.Designer.cs
===================================================================
--- /Updater/Properties/Resources.Designer.cs (revision 711)
+++ /Updater/Properties/Resources.Designer.cs (revision 711)
@@ -0,0 +1,72 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.1433
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Updater.Properties
+{
+
+
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources
+    {
+
+		#region Constructors (1) 
+
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources()
+        {
+        }
+
+		#endregion Constructors 
+        private static global::System.Resources.ResourceManager resourceMan;
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager
+        {
+            get
+            {
+                if ((resourceMan == null))
+                {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Updater.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture
+        {
+            get
+            {
+                return resourceCulture;
+            }
+            set
+            {
+                resourceCulture = value;
+            }
+        }
+
+    }
+}
