How to delete my windows application app.exe in program files on uninstalling in c#....On uninstalling my exe its not getting removed from program files...I gave the administrative rts as follows for my app.exe...Also under which event i should write the code to do so...
Collapse | Copy Code
`
Inline Code Example HereProcessStartInfo proc = new ProcessStartInfo();
proc.UseShellExecute = true;
proc.FileName = Application.ExecutablePath;
proc.Verb = "runas";
try
{
Process.Start(proc);
}
catch
{
// The user refused the elevation.
// Do nothing and return directly ...
return;
}
Application.Exit(); // Q
`
and also added app.manifest with requireadministrator option...Still its not going from program files on uninstalling...