Click here to Skip to main content
15,896,727 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

How to forcibly accept UAC prompt using C#.

runas /user:administrator cmd /c " + "@" + "filname.bat";

please help me.
Posted
Comments
F-ES Sitecore 4-Sep-15 3:10am    
What use would UAC be if the calling code could force acceptance?
Member 7684075 8-Sep-15 7:27am    
Through batch file we are running the SystemInfo command line and get the output from host system to remote. I have done creating the batch file in the remote system but while running the batch file we are getting "User Access Control" (UAC) prompt. So by default should accept and run the script.

1 solution

If you mean some way to work around manual confirmation of UAC request, it won't work. Just think about it: if such work around was possible, who would ever need such protection?

—SA
 
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