Exemple #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            //Manually add installation
            manually_add_installation fm = new manually_add_installation(l10n_mai, RTL);

            fm.ShowDialog();
            if (fm.shared_string != null)
            {
                SETTINGS temp = set.open_settings();
                temp.manager_versions = set.update_manager_array(temp.manager_versions, fm.shared_string);
                set.save_settings(temp);
                update_selector();
            }
        }
Exemple #2
0
        private string executeInstallation(bool install_libo, bool install_help, bool install_sdk, string main, string help, string sdk, string dir)
        {
            Process p = new Process();

            if (install_libo)
            {
                p.StartInfo = new ProcessStartInfo("msiexec", "/qr /norestart /a \"" + main + "\" TARGETDIR=\"" + dir + "\"");
                p.Start();
                p.WaitForExit();
            }
            if (install_help)
            {
                p.StartInfo = new ProcessStartInfo("msiexec", "/qr /a \"" + help + "\" TARGETDIR=\"" + dir + "\"");
                p.Start();
                p.WaitForExit();
            }
            if (install_sdk)
            {
                p.StartInfo = new ProcessStartInfo("msiexec", "/qr /a \"" + sdk + "\" TARGETDIR=\"" + dir + "\"");
                p.Start();
                p.WaitForExit();
            }
            try
            {
                // If installation finished --> Add to manager...
                SETTINGS temp = set.open_settings();
                temp.manager_versions = set.update_manager_array(temp.manager_versions, dir);
                set.save_settings(temp);
                // Create path to soffice.exe
                dir += "\\program\\soffice.exe";
                path_to_exe.Text = dir;
            }
            catch (System.IO.DirectoryNotFoundException)
            {
                MessageBox.Show(getstring("dirnotfound") + getstring("dirnotfoundmessage"), getstring("dirnotfound"), MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (System.Security.SecurityException)
            {
                MessageBox.Show(getstring("si_message"), getstring("si"), MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (Exception ex)
            {
                exceptionmessage(ex.Message);
            }
            return(getbsINIPath());
        }