Exemplo n.º 1
0
        /// <summary>
        /// Starts 7-zip and waits until it finishes its work
        /// </summary>
        /// <exception cref="FieldAccessException">Problems with 7-zip</exception>
        public void StartJob()
        {
            MD5Class.Verify7ZipBinaries();
            Process process = new Process();

            process.StartInfo.UseShellExecute = false;
            process.StartInfo.FileName        = Files.SevenZipGPacker;
            process.StartInfo.Arguments       = _parameters.ToString();

            try
            {
                process.Start();
            }
            catch (System.ComponentModel.Win32Exception exc)
            {
                throw new FieldAccessException(string.Format(CultureInfo.InvariantCulture, Translation.Current[550], exc.Message), exc);
            }

            process.WaitForExit();
        }