On a recent project, I was using the “tried and proven” method to extract COM Data by performing on-site registration using scripting (InstallScript). With Windows 7 the Custom Action is not being elevated with the correct permissions and the registration was failing.
Since I did not want the project to use the InstallShield “KEY” file attributes (a subject of a later post), I reverted to manually extracting the COM Object by using this process:
- Right-click the file in the Component and selecting “Set Key File”
- Right-click the file again in the Component and selecting “Extract COM Data for key file”
- Right-click the file in the Component and selecting “Clear Key File”
The customer reported issues with the extracted COM Data being incomplete! Apparently the CLSID entries were not being correctly extracted – as compared to running RegSvr32.
Now my research did find quite a few reported problems with COM Extraction – and they have been going back as far as IS 10.5! Consequently, I switched methods, and went to www.InstallSite.org and pulled down the utility “RegSpy.exe”
http://www.installsite.org/pages/en/msi/tips.htm
. This utility will manually extract the correct COM data. I did not like the summation of how to extract to the registry – so I made these steps to accomplish this:
1. Created a BAT file that will run RegSpy.exe and output a .REG file – here is a sample that I used:
ECHO ON
REM ***************************************************
REM ** Use RegSpy to extract COM Objects
REM ** Note: Place RegSpy.exe in root of InstallPath!
REM ***************************************************
REM ***************************************************
REM ** Set base directory!
REM ***************************************************
SET InstallPath=E:\Project – OCXs Files\DeploymentFiles
REM ***************************************************
REM ** Set File to extract COM Objects
REM ** Set output registry file and Extract COM Object
REM ***************************************************
SET File=Cal32x30.ocx
SET RegOutputFile=%InstallPath%\%File%.reg”%InstallPath%\regspy.exe” “%InstallPath%\FarPoint\%File%” > “%RegOutputFile%”
2. Edit each output .REG file created and substitute [INSTALLDIR] for the path statement – a sample shown here in the Before state:
[HKEY_CLASSES_ROOT\CLSID\{DEE22B42-FCA5-11D2-A05D-00A0C90DC755}\InprocServer32]
@=”E:\Project~1\DEPLOY~2\FarPoint\Cal32x30.ocx”
“ThreadingModel”=”Apartment”
3. Since I used the input Deployment directory, this differs from the Installed directory, so I substituted [INSTALLDIR] for the path statement – a sample shown here in the After state:
[HKEY_CLASSES_ROOT\CLSID\{DEE22B42-FCA5-11D2-A05D-00A0C90DC755}\InprocServer32]
@=”[INSTALLDIR]Cal32x30.ocx”
“ThreadingModel”=”Apartment”
4. Now go to the InstallShield project and navigate to the Component’s Registry section – and right-click on the center panel for the Destination Machine and select “Import Reg File”. This will import all of the correct COM Data for the component.
Hope This Helps!
ShieldMaster
[...] Alternative method to extract COM Data Shieldmaster Blog posted a workaround if the COM data extracted by InstallShield are incomplete [...]
Pingback by Links of the week 36 - InstallSite Blog — September 13, 2010 @ 4:18 am