Click here to Skip to main content
15,891,677 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys i am working on VB.net (2010) project that requires administrative privileges. I have created a manifest file and changed the execution level to 'requireAdministrator'. I then published (setup/exe) the project using Inno Setup Compiler. Whenever i try to run the installed version, a UAC window pops up and requires me to click yes or enter the administrator password. How can i stop the pop up from appearing without disabling UAC completely. I also noticed that there is no shield sign on the executable (in program files) to indicate that it is elevated. Even when i try to copy the one with a shield sign from my project files, it still pops UAC.
Posted

1 solution

You can't. That is the whole point. If you could do that, then the whole idea of UAC becomes useless - every application could quickly switch to admin without the user knowing and then switch back.

Either live with it, or remove the code requiring admin access from your application.
 
Share this answer
 
Comments
vbGoof 8-Mar-14 9:45am    
I am still wondering how I am going to make the program start with windows then. It is supposed to be always running, (with admin rights). Maybe I can make another program that temporarily disables UAC, then switch it back on once my main app is running.
ledtech3 8-Mar-14 11:14am    
I sounds like you need to run your program as a windows service under the system account.
http://msdn.microsoft.com/en-us/library/zt39148a(v=vs.90).aspx
vbGoof 10-Mar-14 10:55am    
Thank you, will try that as well.
vbGoof 10-Mar-14 11:23am    
Oops!! disabling UAC requires elevation as well...mmhhhh. How do i make ONLY a certain section of my program to be elevated, like when I click a button. How do I manifest that?
vbGoof 14-Mar-14 3:47am    
I thought the Microsoft’s Application Compatibility Toolkit works but it doesn't, it is simply a GUI version of a manifest file.

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