Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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...
C#
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...
Posted
Updated 20-Apr-13 7:14am
v4
Comments
[no name] 20-Apr-13 12:50pm    
How would you expect us to know what it is that you did? What software did you use to create your setup program? Did you tell your setup program not to uninstall your exe? Is your exe running at the time you tried to uninstall it? Did you create a log file? What did your log file say?
Korathu 2 20-Apr-13 12:58pm    
Its the exe of my project created and its not getting removed from program files on uninstalling...
Sergey Alexandrovich Kryukov 20-Apr-13 23:10pm    
Perhaps your program was actually loaded when you tried to removed it. Check it up, please.
—SA
Korathu 2 21-Apr-13 1:06am    
No it isn't..I tried to uninstall my app.exe from control panel..But it isn't getting removed from program files...So i have to remove from program files....I want to remove it from program files automatically when i uninstall from control panel..How to do so....

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900