I created an empty project, with a visual studio msi installer. On install it just creates the folder and the exe file to the project.
But when i am trying to silent uninstall, it remove the installation from program list, but it leaves the folder. I need to remove the folder as well and want to do this without deleting it manually in code.
// This is how to uninstall a basic msi app
// Create the uninstall process.
Process proc = new Process();
// Define the parameters for the process
proc.StartInfo.FileName = "msiexec.exe";
// This is the Product Code from your Basic MSI InstallShield Project
proc.StartInfo.Arguments = "/x" + " " + ProductCode + " " + "/qn";
// Start the process.
proc.Start();
// Wait for the uninstall process to end.
proc.WaitForInputIdle();
proc.WaitForExit();
// Release resources.
proc.Close();