Click here to Skip to main content
See more: C#4.0
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
ProcessStartInfo 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...
Closed because This exact post has already been posted by another member. Reported by Sandeep Mewara, ThePhantomUpvoter on Sunday, April 21, 2013 4:27am.
Posted 20-Apr-13 17:14pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 436
1 Maciej Los 249
2 BillWoodruff 199
3 /\jmot 180
4 Suraj Sahoo | Coding Passion 170
0 OriginalGriff 8,484
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,639
3 Maciej Los 5,159
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 20 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100