Per-user installation of OCX from a web page
We have a web page that includes a custom OCX activex. The activex is signed and the certificate is trusted by every computer in the company, and all computers run Windows 7 and IE8.
However, when a 开发者_JAVA百科user opens the web page for the first time, the UAC popup prompts for administrative privileges. From what we are able to tell, the OCX is trying to install itself for all users of the computer in "C:\Windows\Downloaded Program Files" directory, and that requires administrative privileges.
The question is, is there a way to configure the activex on the web page to install per-user, so that any user of the domain is able to launch it by himself?
We could run some scripts on the computers and install the activex for all users, but that doesn't work for us, as we are planning to have many more activex controls and each will have multiple versions.
Thanks for your help!
Implementing and Administering the ActiveX Installer Service
(very old q, but I just went through this)
If you control the ActiveX control yourself, or can repackage it into a new signed CAB file, you can modify the .INF file for it to be per-user, which will install it into the user's profile.
cf. http://msdn.microsoft.com/en-us/library/dd433049(v=VS.85).aspx
Sample INF follows (may have unneeded entries still):
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[DefaultInstall]
CopyFiles=install.files
[RInstallApplicationFiles]
CopyFiles=install.files
RegisterOCXs=RegisterFiles
AddReg=AddToRegistry
[DestinationDirs]
install.files=11
[SourceDisksNames]
1=%DiskName%,MyControl.CAB,1
[Add.Code]
MyControl.ocx=MyControl.ocx
MSWINSCK.ocx=MSWINSCK.ocx
[install.files]
MyControl.ocx=MyControl.ocx
MSWINSCK.ocx=MSWINSCK.ocx
[SourceDisksFiles]
MyControl.ocx=1
MSWINSCK.ocx=1
[MyControl.ocx]
file-win32-x86=thiscab
RegisterServer=yes
clsid={ACCD6812-5384-4B4F-A155-000000000000}
DestDir=
FileVersion=1,0,0,0
RedirectToHKCU=yes
[MSWINSCK.ocx]
file-win32-x86=thiscab
RegisterServer=yes
clsid={248DD896-BB45-11CF-9ABC-0080C7E7B78D}
DestDir=
FileVersion=6,1,98,17
RedirectToHKCU=yes
[Deployment]
InstallScope=User|Machine
精彩评论