Click here to Skip to main content
15,888,908 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My application runs as administrator but always ask popup for open in system. I am disable uac with programing but some of the application not working.
I want to stop popup message when application start without uac disable.

What I have tried:

my application run as administrator but always ask popup for open in system .i am disable uac with programing but some of the application not working.
i want to stop popup message when application start without uac disable.
Posted
Updated 4-Sep-16 22:00pm
v2

You can't, that's the whole idea.
If your app needs admin access, then the user has to be asked if he approves of this: anything else would allow any application to bypass the admin requirement and render it useless.
 
Share this answer
 
In C# you can actually disable UAC with this following bunch of code:

RegistryKey uac = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",true);
if (uac == null)
{
 uac = Registry.CurrentUser.CreateSubKey(("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System");
}
uac.SetValue("EnableLUA", 1);
uac.Close();


But beside that, there isn't any other way of "removing" User Account Control for specific applications. Also, as Jason Dot Wang say here: Link msdn[^] you should proof your applications against the UAC, rather then trying to disable it.
 
Share this answer
 
v5
Comments
Member 10342650 5-Sep-16 5:26am    
i disable uac then some of the app not working .
xXxRevolutionxXx 5-Sep-16 11:52am    
Read not only the "Disable UAC" code, but all the rest i said. I am not quite sure why this is happening... and the "UAC Disable" doesn't work for all programs... but even if it works, it's bad logic to try to close UAC. Everything about programming is logic... and trying to close UAC just because it popups when someone is opening your program... is just bad logic. Check the other "solution" i gave you.
Member 10342650 6-Sep-16 7:56am    
ok

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