Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Is there any method to bypass the UAc Using vb script or batch command..If there is any way then kindly explain it.
Posted
Comments
Sergey Alexandrovich Kryukov 21-Feb-14 16:36pm    
And how do you think? What would be the answer if you simply use some logical reasoning? :-)
Anyway, I have one useful advice; please see my answer.
—SA

There is absolutely no way to bypass UAC. Not anything I am aware of, anyway. Just think about it: if some coding tricks would allow to bypass UAC, it would turn UAC to a completely useless annoyance. Isn't it obvious?

The different thing is: you could allow UAC request to happen (you don't have a choice anyway :-)) but ease up its use. For example, one widely used approach is this: you know that your application will eventually require elevated privileges, in nearly all cases. If you execute it as non-elevated, you would need to deal with permission exception. But even you do it all correctly, running it as non-elevated makes no practical sense. Then the solution is this: created and embed the application manifest which would force the OS the request the user with UAC dialog immediately, thus eliminating a need for "Run As Administrator" option. Here is how:
http://msdn.microsoft.com/en-us/library/bb756929.aspx[^].

It will let the user to deal with UAC confirmation anyway, only without unwanted step.

—SA
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 21-Feb-14 16:39pm    
I am grateful to the one who up-voted this simple answer. I can see that it means that it could be improved. I really want to know how.
I this is providing some extra resource or explanations, or language, I would agree. But I hope it won't be a requirement to bypass UAC... :-)
—SA
No.
If your application does something that needs admin permissions, then the UAC will ensure it does not run unless the user has given the correct permissions.
 
Share this answer
 

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