View Full Version : Problems with WSH

11-04-2005, 03:15 PM
I am having a problem with WSH. If I don't either include scrrun.dll and register it or else have a custom action that runs scripten.exe, our applications report the following error:

ActiveX component can't create object.

If I regsvr32 c:\windows\system32\scrrun.dll, it works just fine. This happens on Win2K and WinXP. Haven't tried it on NT4 or 98.

Any ideas?

Charles Hodgkins
Data911 Systems
Alameda, CA

Christopher Painter
11-04-2005, 04:06 PM
There is a scripting host merge module, you shouldn't need to write your own components and CA's.

Have you tried VBScriptRuntimeENU.msm?

11-04-2005, 05:41 PM
No, I was under the impression that I neeeded to use WSH 5.6. Should I have been using VBScriptRuntimeENU.msm?

Scripting is used in our applications and not in the msi.



11-09-2005, 01:11 PM
Well I added the VBScriptRunTime MM and I still have scripting problems. Once I've installed if I run regsvr32 c:\windows\system32\scrrun.dll, the application functions correctly. It does not work until I do that.


Christopher Painter
11-09-2005, 02:08 PM
If you edit that MSM you will se scrrun.dll is in the binary table along with vbscripthelper. You'll see there is a custom action of type 257 ( type 1 standard MSI calll ) with an entrypoint InstallVBScript if nessecary.

If you save the vbscripthelper binary off as a dll and edit it in notepad you'll see plain text references to the binary table and scrrun.dll.


The MSM's custom action is merged into the install. When the custom action runs logic inside the DLL detects if installation is 'nessecary'. If it is it uses MSI API calls to extract the scrrun.dll from the binary table to the system32 directory and then performs a self registration. Not very MSI like is it?

My guess is the CA doesn't think it's nessecary. You'd have to create a very simple MSI in ORCA that only calls this one CA and use RegMon and Filemon to try to get insite into what the CA is doing for a AppSearch in making this determination. Fix that and I think you'll see the MSM start working.

Or you can just create your own custom action to do the selfreg.

Sorry its not a pretty answer.

Christopher Painter
11-09-2005, 02:26 PM
While I was at it I was looking over the WSH56.MSM and I notice some problems with it aswell. All the custom actions are in the ModuleInstallUISequence but there is no ModuleInstallExecuteSequence.

That's not going to be good for a silent /qn install.

11-09-2005, 02:34 PM
I'll give that a try. As you say it's not very MSI-like. Nor is scripten.exe. I just wish that MS would follow their own rules.

Do you have any thoughts as to why scrrun.dll appears to get un-registered by my install. If I could figure that out, I might be able to fix that cause.

Thanks for all your help.