Windows Script: “WScript.CreateObject: Could not locate automation class named “WScript.Network”


When I run my VBScript Windows Script ActiveX libraries are not loading. I was getting “WScript.CreateObject: Could not locate automation class named “WScript.Network”.

Solution:

for 32bit OS:

  1. Open command prompt
  2. Type regsvr32 c:\windows\system32\wshom.ocx
  3. Type regsvr32 c:\windows\system32\scrrun.dll

for 64bit OS:

  1. Open command prompt
  2. Type regsvr32 c:\windows\SysWOW64\wshom.ocx
  3. Type regsvr32 c:\windows\SysWow64\scrrun.dll

That’s all. Your script should now work.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s