Video Screencast Help

Error "ActiveX component cannot create object" & "ActiveX component cannot create object Wscript.Network"

Created: 10 Aug 2009 • Updated: 21 May 2010 | 10 comments
This issue has been solved. See solution.

Scenario: Created a vbscript custom action, trying to execute a vbscript custom action from the MSI.
'm getting this error, If i execute the script script separately. Please advise. Thanks.


Comments 10 CommentsJump to latest comment

philbenson's picture

or should we be forced to use our "Psychic Debugging Powers"? Wait, I'll have a go... you do know that there is no need to explicitly create some objects, as the are already implicitly created when the MSI engine starts the vbs CA calling....


Tillu1981's picture

I suspect windows script host in your case. Try to download latest windows script host and install. You can also try to register the following file wshom.ocx
Start --> Run --> Type "regsvr32.exe wshom.ocx" [without quotes] --> press enter

If this doesn't fix your issue then try to download windows script host latest version and install. That should solve the issue.
WSH 5.7 Download Link:



VBScab's picture

Do none of those things without first ensuring that you are NOT using the 'WScript' directive in front of your 'CreateObject' call. That is, change this:

     Set objWSHShell            = WScript.CreateObject("WScript.Shell")

to this:

     Set objWSHShell            = CreateObject("WScript.Shell")               

The WI engine uses its own interpreter (let's call it), and not the Windows Script Host which is what you call if you use 'WScript'. Note that, confusingly, you can create WScript objects (as in the above example).

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using before posting.

Amarendra's picture

Hi Phil,
Following is the sample code that i was testing:

Set FSO = CreateObject("Scripting.FileSystemObject")
Set WSHELL = CreateObject("WScript.Shell")

Though i create a vbscript and execute it manually, i was getting activex error [can not create].

Thank you Tillu!
I tried registering wshom.ocx file and it worked. Also i diownloaded and installed latest WSH. Thank you for the solution.


philbenson's picture

explicitly calling cscript.exe "booHaa", wscript.exe "boohaa" or just double clicking the vbs file? 8Just out of interest)
As Ian has already stated, the CScript object is implicitly created during the MSI CA calling of vbs, hence (normally) the error.


Eshwar's picture

Recently i faced the same isue when i was executing the vbscript manually [from VBSEDIT]
I was not getting the error when i executed the same script with another machine.

Kyle, suggested me the following solution:

Start/Run:  regsvr32.exe wshom.ocx
regsvr32.exe sccrun.dll
 latest WSH install

And you know what, it worked. Now i'm able to execute the script manually in my machine.



philbenson's picture

the script debugging engine from MS, and not the "normal" runtime engine. I suspect there was someting "faul" with the initial installation.
The script debugging engine must also be correctly installed and registered


VBScab's picture

I should, perhaps, have qualified my statement by saying that the WScript caveat only applies to embedded VBScript and not to scripts called externally, i.e. those included with the installation or comprssed into the Binary table.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using before posting.

mjtpzfrL's picture

 in my case, i wanted to execute an application on a machine A,  which Setup i have lost...i previously installed the Setup on a machine B.
For this, i have:
- copied all the exe and dll concerning the application  from  machine B , to paste them exactly in the same directory on as the were 
- then, i have copied all the reg files about the application on machine B  to paste them in registry of machine A
When launch  executable files, i get these messages:
 " ActiveX component can' t create object "
" error 429 ActiveX component can' t create object " How to solve this???

EdT's picture

Copying the reg files will most likely achieve nothing. Try running the reg files so that the content is entered into the registry.
Also try registering any DLL and OCX files that you copied over.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.