Hello,
I have a problem deploying my ActiveX control on Vista, which seems to be related to the packaging scheme that I'm currently using. The mechanism in use works on Windows 2000 and XP (with and without IE7), but fails on Vista.
Here's the packaging scheme that I'm using:
I have an ActiveX control, "mycontrol.dll", that has several dependencies on other components (packaged as MSI merge modules), all packaged together into an MSI file, "mycontrol.msi". To deploy this control, I have been using an INF file with a setup hook, and packaging the entire set into a signed CAB file.
1. "mycontrol.dll" is packaged into "mycontrol.msi" (along with its dependencies).
2. "mycontrol.msi" is packaged along with "mycontrol.inf" into "mycontrol.cab" (properly signed).
3. "mycontrol.inf" looks like this:
[Setup Hooks]
hook.mycontrol=hook.mycontrol
[Add.Code]
mycontrol.dll=mycontrol.dll
[mycontrol.dll]
CLSID={50894390-9cb3-4a6d-bb40-b786b7e9548d}
FileVersion=1,1,0,3
hook=hook.mycontrol
[hook.mycontrol]
run=msiexec.exe /i %EXTRACT_DIR%\mycontrol.msi /qb
[Version]
; This section is required for compatibility on both Windows 95 and Windows NT.
Signature="$CHICAGO$"
AdvancedInf=2.0
On Vista (Protected Mode off or on -- the behavior seems to be the same in both cases), visiting a page that references mycontrol.cab results in the following sequence:
1. The Information Bar is displayed as normal. Browser user clicks on it and selects "Install ActiveX Control..."
2. The User Account Control prompt is displayed, showing "Internet Explorer Add-on Installer/Microsoft Windows". Browser user clicks on "Continue".
3. "Internet Explorer Add-on Installer - Security Warning" prompt is displayed, "Do you want to install this software ", showing the name of the CAB file and the Publisher. Browser user clicks on "Install".
4. Everything up to this point seems fine -- but now, nothing else is shown. In particular, the MSI installation process doesn't even start, best I can tell.
Troubleshooting so far:
Basically, I've tracked down the component download log (the old CDLLogViewer doesn't seem to work on Vista, but I dug through the cache files to find this):
*** Code Download Log entry (19 Feb 2007 @ 12:11:34) ***
Code Download Error: (hr = 80070005) Access is denied.
Operation failed. Detailed Information:
CodeBase: http://www.myserver.com/myapp/mycontrol.cab
CLSID: {50894390-9cb3-4a6d-bb40-b786b7e9548d}
Extension:
Type:
LOG: Item mycontrol.dll being processed.
--- Detailed Error Log Follows ---
LOG: Download OnStopBinding called (hrStatus = 0 / hrResponseHdr = 0).
LOG: Item mycontrol.dll being processed.
LOG: URL Download Complete: hrStatus:0, hrOSB:0, hrResponseHdr:0, URL:(http://www.myserver.com/myapp/mycontrol.cab)
ERR: Run Setup Hook: Failed Error Code:(hr) = 80070005, processing: msiexec.exe /i %EXTRACT_DIR%\mycontrol.msi /qb
LOG: Reporting Code Download Completion: (hr:80070005 (FAILED), CLASSID: 50894390..., szCODE:(http://www.myserver.com/myapp/mycontrol.cab), MainType:(null), MainExt:(null))
So, a few questions:
1. Should this scheme work on Vista
2. If not, what alternatives exist for deploying an MSI-based package of controls from a page
Any suggestions or insights would be very helpful, and much appreciated!

ActiveX Control deployment on Vista using MSI and CAB setup hooks
droujav
"run=%EXTRACT_DIR%\setup.exe -installdir=c:\program files\common files\witness systems -inffile=atxwitplayer2.inf -regfiles=atxwitplayer2.dll"
Setup.exe and all other files are inside this cab.
Everything works great on XP. The installer works great on Vista from the command-line. In IE7 on Vista I get:
1. UAC prompt
2. ActiveX Installer prompt
3. nothing (doesn't even appear to run)
Protected mode is off.
Site is trusted.
Download signed ActiveX is prompt.
ActiveX installer service and global policy is configured (works for other ActiveX not requiring "run" entry).
I've tried adding an elevation manifest to Setup.exe, but it doesn't seem to help. Can you think of anything I'm missing
Tom
erikkl2000
Basicall, there are two issue here:
1) msiexec.exe not running.
2) EXE in cab file not running.
Work around:
1) As Sharath pointed out, in Vista with UAC enabled, IE will refuse to run any code not packaged in the CAB file. In this case, specifically, MSIEXEC.EXE. To work around the issue, you need to create a small bootstrap EXE, which does nothing but to launch MSIEXEC.EXE and then wait for its completion.
2) If the hook statement contains a parameter with path, you need to put three double quotes around the EXE.
For example:
[preInstall]
run="""%EXTRACT_DIR%\PrepareInstall.exe""" %OBJECT_DIR%
See http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=888813&SiteID=1 for more detail.
Hope this helps.
Mikymoto
- Executable (PrepareInstall.exe) is present in the CAB file
- inf file:
[Setup Hooks]
preInstall=preInstall
[preInstall]
run="%EXTRACT_DIR%\PrepareInstall.exe" %OBJECT_DIR%
- PrepareInstall.exe is in the CAB file
- when installing, there is the UAC dialog for the IE Add-on Installer and a security warning because the publisher could not be verified. After clicking "Install" on this last one, the installation fails.
- No CodeDownloadLog files are created in the temporary internet files
- No files are extracted
Any clue would be helpful
--Alan---
CodeDjinn
I found another thread which has the reason (no solution, however
) for this specific problem: there's a problem with the substitution of the OBJECT_DIR variable, causing the hook not to be executed: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=888813&SiteID=1
Carver42
Denvas
Sharath,
I have one question.. We included the necessary dlls and made an entry in the ini file and made a signed cab file. We were able to come out successfully in other OS and not in VISTA. The reason what we found is when the UAC is enabled and logged user is an administrator, the cab file is downloaded, also registers and our application runs perfectly fine. But it is not when UAC is enabled. Could you please guide us in what way we can solve this issue.. I am searching for some suggestion as to what can be done.. But unable to find..
Regards,
TSN