Unable to automate uninstalling a program silently from Program files using C#

48 Views Asked by At

If I place the same file in another folder location it works fine.

This is the code I am currently using

 `Process UninstallCmd = new Process();
  UninstallCmd.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
  UninstallCmd.StartInfo.FileName = "cmd.exe";           
  UninstallCmd.StartInfo.Arguments = "/C C:\\Program Files\\Program\\uninst.exe /S";
  UninstallCmd.StartInfo.Verb = "runas";
  UninstallCmd.Start();
0

There are 0 best solutions below