Click here to Skip to main content
15,844,387 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
In an ASP.NET 2.0 Application, an ActiveX control is used. When user first time access the appliction and he/she did not have that ActiveX registered. Application show a popup to install ActiveX. When user follow the process, ActiveX is registered and application loads the ActiveX to accomplish desired tasks.

In Windows Vista, Win 7 and Win 8, User Access Control (UAC) is prompted to allow to install the ActiveX at very first time. This happens even if user is Administrator too.

What are alternatives to override this UAC component while installing ActiveX ?
Suggestions are appreciated.
Posted

The only solution is to turn UAC off, there's nothing you can do in code to get around this.

UAC exists to protect the user from the code. For that reason the code can't bypass the user. If there was a way around this in code, then viruses or malware could bypass UAC without telling the user, therefore making UAC useless.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 23-Jul-13 1:37am    
Exactly, a 5.
—SA
Sergey Alexandrovich Kryukov 23-Jul-13 1:39am    
I am amazed by the logic of some. One of the typical question is: "Error message says: 'You cannot do A'; my question: how to do A?". :-)
—SA
Ron Beyer 23-Jul-13 1:40am    
Logic has no place in beginner programming :)
Sergey Alexandrovich Kryukov 23-Jul-13 1:44am    
:-)
The bigger problem is: I faced with such "beginners" with 20+ years of "experience". They already seized to understand that they are still beginners with negative value (their value was about zero when they were younger). This is really sad...
—SA
Sergey Alexandrovich Kryukov 23-Jul-13 1:47am    
And you know what? I hope your (hopefully humorous) note on beginners is not true. I knew many people who were quite reasonable from the very first steps in programming. Sometimes I think that only they have done something valuable.
Being a real beginner (the one who really begins) is a noble position, many never reach this status...
—SA
In addition to discussion in comments to Solution 1:

You user is always free to lower down UAC protection. For example, on Windows 7:
Control Panel -> Small Icons (All Control Panel Items) -> Action Center -> Change User Account Control Settings.

If your customer lowers the slider down to "Never Notify", she/he won't have UAC messages at all. It's important that they make this questionable decision by themselves and that you won't do it on your computer. :-)

And of course, your application cannot lower down UAC, otherwise it would defeat the purpose of the whole idea of UAC.

You can do different thing. You may know that your application would always need elevation of privileges. In this case, you may want to request elevation of the privileges in the very beginning, without having the user to use "Run as Administrator" or using equivalent *.LNK. This is done by claiming requested permissions accordingly in the embedded application manifest. Such manifest is created and embeded very easily. Please see:
http://msdn.microsoft.com/en-us/library/bb756929.aspx[^].

—SA
 
Share this answer
 
v2
Comments
Ron Beyer 23-Jul-13 10:34am    
+5, good points.
Sergey Alexandrovich Kryukov 23-Jul-13 11:04am    
Thank you, Ron.
—SA
There is no way to bypass UAC. But you can register your control at User-Level which will no required Administrator Privileges. Window Vista or later with IE8 introduce the new mechanism to register ActiveX control at Current-User with non-admin rights. You only have to update your INF file and then repackaging your control.

Please check the following link for more detail.
http://msdn.microsoft.com/en-us/library/dd433049(VS.85).aspx[^]

Please Note that this answer is valid if you have In-Proc ActiveX control.
 
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