简体   繁体   中英

I can't hide my process WPF

Finally give up on this, How can I hide this process.

Basically I want to do background Installation. It did't ask for next and all. I just don't want that installation screen what should I do. Thank you

void _bw_DoWork(object sender, DoWorkEventArgs e)
{
    string filePath = @"C:\Program Files (x86)\Microsoft\AlisInstallerDemo\AlisEmail.exe";

    if (File.Exists(filePath))
        MessageBox.Show("File Already Install ");
    else
    {
        //Install software
        Process p = new Process();
        p.StartInfo.FileName = "msiexec.exe";
        p.StartInfo.Arguments = string.Format("/qb /i \"{0}\" ALLUSERS=1", @"C:\Users\d.soni\Desktop\setup.msi");
        p.StartInfo.Verb = "runas";
        p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
        p.Start();
        p.WaitForExit();
    }

You're explicitly requesting a window with /qb. Run "msiexec /?" to see command line options. Perhaps you want "/qn" and "/quiet".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM