Beispiel #1
0
 private void InstallWin7Sp1()
 {
     this.BeginInvoke(new Action(() => Status   = "Installing Win 7 SP 1 ..."));
     this.BeginInvoke(new Action(() => Progress = "(1/2)"));
     if (SystemInfo.is64BitOperatingSystem)
     {
         if (System.IO.File.Exists(Helper.StartupPath + @"\Requirements\Prerequisites\Installers\Win7PS1\x64\windows6.1-KB976932-X64.exe"))
         {
             Helper.Execute(Helper.StartupPath + @"\Requirements\Prerequisites\Installers\Win7PS1\x64\windows6.1-KB976932-X64.exe",
                            //"/quiet /nodialog /norestart", true);
                            "/unattend /norestart", true);
         }
         else
         {
             MessageDialogue.ShowMessage("Missing File", "Please download Installer with Windows 7 SP 1 included");
         }
     }
     else
     {
         if (System.IO.File.Exists(Helper.StartupPath + @"\Requirements\Prerequisites\Installers\Win7PS1\x86\windows6.1-KB976932-X86.exe"))
         {
             Helper.Execute(Helper.StartupPath + @"\Requirements\Prerequisites\Installers\Win7PS1\x86\windows6.1-KB976932-X86.exe",
                            //"/quiet /nodialog /norestart", true);
                            "/unattend /norestart", true);
         }
         else
         {
             MessageDialogue.ShowMessage("Missing File", "Please download Installer with Windows 7 SP 1 included");
         }
     }
     this.BeginInvoke(new Action(() => Status = "Installed Win 7 SP 1 ..."));
 }
Beispiel #2
0
        private void SplashScreen_Load(object sender, EventArgs e)
        {
            if (!System.IO.Directory.Exists("C:\\Program Files\\Complete Distribution\\Client\\Enterprise"))
            {
                System.IO.Directory.CreateDirectory("C:\\Program Files\\Complete Distribution\\Client\\Enterprise");
            }
            else
            {
                if (System.IO.File.Exists("C:\\Program Files\\Complete Distribution\\Client\\Enterprise\\CDS.Client.Desktop.exe"))
                {
                    if (MessageDialogue.ShowMessage("Application already installed", "Complete Distribution has already been installed. Run repair tool ?") == System.Windows.Forms.DialogResult.OK)
                    //if (MessageBox.Show("Complete Distribution has already been installed. Run repair tool ?", "Application already installed", MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
                    {
                        //Run repair
                        //Werner : Dont do this
                        //System.IO.Directory.Delete("C:\\Program Files\\Complete Distribution\\Client\\Enterprise", false);
                        //System.IO.Directory.CreateDirectory("C:\\Program Files\\Complete Distribution\\Client\\Enterprise");
                    }
                    else
                    {
                        Application.Exit();
                    }
                }
            }

            BackgroundWorker.RunWorkerAsync();
        }
Beispiel #3
0
 private void InstallLocalDB()
 {
     this.BeginInvoke(new Action(() => Status   = "Installing SQL 2014 LocalDB ..."));
     this.BeginInvoke(new Action(() => Progress = ""));
     if (SystemInfo.is64BitOperatingSystem)
     {
         if (System.IO.File.Exists(Helper.StartupPath + @"\Requirements\Prerequisites\Installers\SQL\2014 LocalDB\x64\SqlLocalDB.msi"))
         {
             Helper.Execute(Helper.StartupPath + @"\Requirements\Prerequisites\Installers\SQL\2014 LocalDB\x64\SqlLocalDB.msi",
                            //"/quiet /nodialog /norestart", true);
                            "IACCEPTSQLLOCALDBLICENSETERMS=YES /passive", true);
         }
         else
         {
             MessageDialogue.ShowMessage("Missing File", "Please download Installer with Sql LocalDB included");
         }
     }
     else
     {
         if (System.IO.File.Exists(Helper.StartupPath + @"\Requirements\Prerequisites\Installers\SQL\2014 LocalDB\x86\SqlLocalDB.msi"))
         {
             Helper.Execute(Helper.StartupPath + @"\Requirements\Prerequisites\Installers\SQL\2014 LocalDB\x86\SqlLocalDB.msi",
                            //"/quiet /nodialog /norestart", true);
                            "IACCEPTSQLLOCALDBLICENSETERMS=YES /passive", true);
         }
         else
         {
             MessageDialogue.ShowMessage("Missing File", "Please download Installer with Sql LocalDB included");
         }
     }
     this.BeginInvoke(new Action(() => Status = "Installing SQL 2014 LocalDB ..."));
 }
Beispiel #4
0
        private void InstallSQLClrTypes()
        {
            this.BeginInvoke(new Action(() => Status   = "Installing SQL Clr Types ..."));
            this.BeginInvoke(new Action(() => Progress = ""));

            if (SystemInfo.is64BitOperatingSystem)
            {
                if (System.IO.File.Exists(Helper.StartupPath + @"\Requirements\Prerequisites\Installers\SQL\SQLNCLI\x64\SQLSysClrTypes.msi"))
                {
                    Helper.Execute("cmd.exe", " /C \"" + "C:\\Program Files\\Complete Distribution\\Client\\Enterprise\\Setup\\Requirements\\Prerequisites\\Installers\\SQL\\SQLNCLI\\x64\\SQLSysClrTypes.msi" + "\" /qn ",
                                   true, false, "C:\\Program Files\\Complete Distribution\\Client\\Enterprise\\Setup\\Requirements\\Prerequisites\\Installers\\SQL\\SQLNCLI\\x64\\");
                    //Helper.Execute("msiexec", "/q /i \"" + Helper.StartupPath + "\\Requirements\\Prerequisites\\Installers\\SQL\\SQLNCLI\\x64\\SQLNCLI_64.MSI\"",
                    //      true, false);
                }
                else
                {
                    MessageDialogue.ShowMessage("Missing File", "Please download Installer with Sql Clr Types included");
                }
            }
            else
            {
                if (System.IO.File.Exists(Helper.StartupPath + @"\Requirements\Prerequisites\Installers\SQL\SQLNCLI\x86\SQLSysClrTypes.msi"))
                {
                    //Helper.Execute("msiexec", "/q /i \"" + Helper.StartupPath + "\\Requirements\\Prerequisites\\Installers\\SQL\\SQLNCLI\\x86\\SQLNCLI_64.MSI \"",
                    //        true, false);
                    Helper.Execute("cmd.exe", " /C \"" + "C:\\Program Files\\Complete Distribution\\Client\\Enterprise\\Setup\\Requirements\\Prerequisites\\Installers\\SQL\\SQLNCLI\\x86\\SQLSysClrTypes.msi" + "\" /qn ",
                                   true, false, "C:\\Program Files\\Complete Distribution\\Client\\Enterprise\\Setup\\Requirements\\Prerequisites\\Installers\\SQL\\SQLNCLI\\x86\\");
                }
                else
                {
                    MessageDialogue.ShowMessage("Missing File", "Please download Installer with Sql Clr Types included");
                }
            }
        }
Beispiel #5
0
 public static DialogResult ShowMessage(string header, string message)
 {
     try
     {
         MessageDialogue alert = new MessageDialogue(header, message);
         return(alert.ShowDialog());
     }
     catch (Exception ex)
     {
         return(DialogResult.Abort);
     }
 }
Beispiel #6
0
        private void InstallSQLSMO()
        {
            this.BeginInvoke(new Action(() => Status   = "Installing SQL SMO ..."));
            this.BeginInvoke(new Action(() => Progress = ""));

            if (SystemInfo.is64BitOperatingSystem)
            {
                if (System.IO.File.Exists(Helper.StartupPath + @"\Requirements\Prerequisites\Installers\SQL\SQLNCLI\x64\SharedManagementObjects.msi"))
                {
                    Helper.Execute("cmd.exe", " /C \"" + "C:\\Program Files\\Complete Distribution\\Client\\Enterprise\\Setup\\Requirements\\Prerequisites\\Installers\\SQL\\SQLNCLI\\x64\\SharedManagementObjects.MSI" + "\" /qn",
                                   true, false, "C:\\Program Files\\Complete Distribution\\Client\\Enterprise\\Setup\\Requirements\\Prerequisites\\Installers\\SQL\\SQLNCLI\\x64\\");

                    //Microsoft.SqlServer.Management.BatchParser
                    //Need to install x64 and x86 on x64 System
                    Helper.Execute("cmd.exe", " /C \"" + "C:\\Program Files\\Complete Distribution\\Client\\Enterprise\\Setup\\Requirements\\Prerequisites\\Installers\\SQL\\SQLNCLI\\x86\\SharedManagementObjects.MSI" + "\" /qn",
                                   true, false, "C:\\Program Files\\Complete Distribution\\Client\\Enterprise\\Setup\\Requirements\\Prerequisites\\Installers\\SQL\\SQLNCLI\\x86\\");
                }
                else
                {
                    MessageDialogue.ShowMessage("Missing File", "Please download Installer with Sql SMO included");
                }
            }
            else
            {
                if (System.IO.File.Exists(Helper.StartupPath + @"\Requirements\Prerequisites\Installers\SQL\SQLNCLI\x86\SharedManagementObjects.msi"))
                {
                    //Helper.Execute("msiexec", "/q /i \"" + Helper.StartupPath + "\\Requirements\\Prerequisites\\Installers\\SQL\\SQLNCLI\\x86\\SQLNCLI_64.MSI \"",
                    //        true, false);
                    Helper.Execute("cmd.exe", " /C \"" + "C:\\Program Files\\Complete Distribution\\Client\\Enterprise\\Setup\\Requirements\\Prerequisites\\Installers\\SQL\\SQLNCLI\\x86\\SharedManagementObjects.MSI" + "\" /qn",
                                   true, false, "C:\\Program Files\\Complete Distribution\\Client\\Enterprise\\Setup\\Requirements\\Prerequisites\\Installers\\SQL\\SQLNCLI\\x86\\");
                }
                else
                {
                    MessageDialogue.ShowMessage("Missing File", "Please download Installer with Sql SMO included");
                }
            }
        }