3

We're migrating to Windows 7 (UAC enabled) and this is stopping standard users from installing ActiveX controls for an internal web app.

I have access to a local admin account which I can run elevated, and I can easily grab the required .cab files. Is there a simple way to install them in such a way that the .inf file is respected? The .inf files in question contain hooks to control the installation so I would rather not simply call regsvr32 on the contained .ocx files.

Basically I would like to emulate the IE installation process using C#, with files appearing in "Downloaded Program Files", all registry settings correctly written, etc.

Btw, I note that there is an "ActiveX Installation Service" available for Win7 machines, but this does not appear to be enabled/configured.

Additional Information

This question has been marked as a duplicate and it certainly appears similar to the original question, but in my scenario I have access to a local admin account so my question is specifically about emulating the IE installation process rather than overcoming UAC restrictions. @Ben suggested a solution using advpack (via rundll32) but I have been unable to get this to work in my environment, although I will continue to investigate.

In the meantime I have been able to implement a brute-force method which exactly replicates the installation behaviour using IE. This entails locating and extracting files to the "Downloaded Program Files" directory, calling regsvr32 on the extracted ocx/dll files, and then adding entries to the following registry locations:

HKLM\SOFTWARE\Microsoft\Code Store Database\Distribution Units HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ModuleUsage HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls

I am currently unable to answer my own question with this information.

weaver
  • 31
  • 1
  • 5
  • This similar question might be of some assistance: http://stackoverflow.com/questions/1769623/issue-with-cab-file-activex-installation-on-windows-vista-and-7?rq=1 – Security Hound Mar 05 '13 at 14:09
  • Thanks, but its 3rd party so I cannot recompile the controls. The linked MSDN article ("Non-Admin ActiveX Controls") looks interesting as it entails a simple change to the .inf file, but I would prefer to leave everything server-side untouched if at all possible. As I said, I have an admin account at my disposal so I am theoretically able to overcome UAC restrictions. – weaver Mar 05 '13 at 14:42

1 Answers1

1

Roll the required component out using group policy, MOM or similar.

You simply need to work out the correct command line to do an administrative install of the component and you can add this into a logon script or similar. Once the component is installed "for all users" then the problem should go away.

As for how to do that, that is a different question:

Ensure you run as an administrative or elevated account.

Community
  • 1
  • 1
Ben
  • 34,935
  • 6
  • 74
  • 113
  • Yes, a centralised rollout would be ideal. But irrespective of the delivery mechanism I need the "correct command line" as you suggest. This is what I am looking for here. – weaver Mar 06 '13 at 07:59
  • Answer is what to do to solve the problem. Added link for how to do it. – Ben Mar 06 '13 at 10:02
  • I want to accept this as the answer because it certainly appears to be what I need, but unfortunately it does not work on my dev machine (XP SP3). It just silently does nothing. Presumably this problem should be posed as a new question rather than a divergence of the original question? – weaver Mar 11 '13 at 07:59