$theTitle=wp_title(" - ", false); if($theTitle != "") { ?>
About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like
Today I was troubleshooting a Thinapped Visual Basic Application. The application halts with a Run-time error ‘372’ when trying to run a report:
Microsoft KB article kb942870 hints to an ActiveX component that is registered into HKCU instead of HKLM.
A trace with the ThinApp Log Monitor reveals that the application is looking for an ActiveX component under HKCU:
1 | RegOpenKeyExW [80000001h=HKEY_CURRENT_USER\][Software\Business Objects\Suite 11.0\Components\ActiveX Viewer not found in RW_View & fully isolated] -> 2h |
A registry trace shows that the component (Crystal Reports ActiveX Report Viewer) registers itself to HKLM but also creates a few keys under HKCU that are required to make the viewer run.
I decided to register the component from a VBScript inside the ThinApp package since this is easier and more fool proof than capturing all the registry keys and adding them to the package.ini.
The VBS Script simply calls RegSvr32.exe with the /s (silent) parameter:
1 2 3 | Function OnFirstParentExit ExecuteExternalProcess("RegSvr32 /s " & chr(34) & "C:\Program Files\Common Files\Business Objects\3.0\crystalreportviewers11\ActiveXControls\crviewer.dll" & Chr(34)) End Function |
Just save the VBS script with a name of choice in the same folder as the package.ini file.
Leave a reply