sarita54
Member
- Joined
- May 31, 2022
- Messages
- 10
- Programming Experience
- Beginner
Hi , I try to update my app , with a .msi installer from a update button in my app
For that , I need to kill my current app before the installation :
The installer open well , just can't finish the installation because the app is not killed , and if i remove the waitforexit , the app killed but also the installer
Could someone help me please?
For that , I need to kill my current app before the installation :
C#:
Process process = new Process();
process.StartInfo.FileName = "Update.msi";
process.StartInfo.WorkingDirectory = @"C:\Program Files (x86)\MyAppFile\";
process.StartInfo.UseShellExecute = true;
process.Start();
process.WaitForExit(60000);
Process proc = new Process();
ProcessStartInfo info = new ProcessStartInfo()
{
FileName = "CMD.exe",
Arguments =
"/C taskkill /im MyApp.exe /f /t",
CreateNoWindow = true,
};
proc.StartInfo = info;
proc.Start();
Could someone help me please?
Last edited by a moderator: