Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
Is there any way to bypass UAC (User Access Control) settings so that my application will launch without any prompt ?

Also I found that the microsoft product will not prompt for UAC settings, so does it mean microsoft producs are bypassing UAC settings or they are using some special treatment to handle the UAC settings.
Posted
Comments
virusstorm 12-May-15 11:21am    
What is your application doing to get the UAC prompt? What you might be seeing is the untrusted application warning. If this is what you are seeing, you need to sign your application with a valid certificate from a trusted CA.
http://blogs.msdn.com/b/ieinternals/archive/2011/03/22/authenticode-code-signing-for-developers-for-file-downloads-building-smartscreen-application-reputation.aspx
RhishikeshLathe 13-May-15 0:28am    
Thanks. It is helpfull.
One more thing I want to know that why microsoft producs will not give prompt for UAC e.g. While launching Office world will not give any prompt.
Philippe Mori 12-May-15 12:09pm    
Why your application need elevated priviledge. Most application should not need them.

No, the system belongs to the user, not the application. This is just the sort of question that spammers and hackers are always asking. And no one here is going to help you to become one of those annoying types.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 12-May-15 11:30am    
5ed. I added some more detail and suggestions in Solution 2.
—SA
No, but the user can 1) use "XP mode"; 2) turn off the UAC security. I would strongly recommend avoiding any of these dangerous steps.
You cannot do it in your application, but the reasons Richard MacCutchan explained in Solution 1.

The best you can do it to create and embed the application manifest which would request the privilege elevation from the very beginning, freeing the user from doing it manually: http://msdn.microsoft.com/en-us/library/bb756929.aspx[^].

See also: http://en.wikipedia.org/wiki/User_Account_Control[^].

—SA
 
Share this answer
 
Comments
RhishikeshLathe 13-May-15 1:20am    
One more thing I want to know that why microsoft producs will not give prompt for UAC e.g. While launching Office world will not give any prompt.
Sergey Alexandrovich Kryukov 13-May-15 1:32am    
Please see Solution 3.
—SA
RhishikeshLathe asked:

One more thing I want to know that why Microsoft products will not give prompt for UAC, e.g. while launching Office Word will not give any prompt.
I don't know such applications and pretty much sure they don't exist. Microsoft applications, including system utilities, play the game with the same rules.

Microsoft Office Word, you say? Let's see. This application does not use UAC prompt, because it does not do anything which would require elevated privileges. It's easy to check itup. Do the following: start Word without "Run As Administrator"; UAC request dialog is not required. Using elevated privilege on some directory Properties, make an administrative change: limit write access to this directory so it would be possible only with elevated privileges. Then try to save Word document to this directory. You will get permission exception, handled, with appropriate error message. Now, run Word "As Administrator" and pass UAC dialog. Now Word will allow you to write to this directory.

In contrast to that, run Regedit.exe. Even though many operations with this utility don't require elevated privileges, this application has the application manifest always requesting UAC dialog, as I described in Solution 1. You can only run this utility if you pass the UAC confirmation.

—SA
 
Share this answer
 
v3
Comments
RhishikeshLathe 14-May-15 2:01am    
Thanks Sergey Alexandrovich Kryukov, you are always helpfull.
Sergey Alexandrovich Kryukov 14-May-15 10:20am    
You are very welcome.
Good luck, call again.
—SA

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