Symptom

When running a VBScript in your system, the following error message may occur:

Script: C:\Scripts\MyScript.vbs
Line: 1
Char: 1
Error: ActiveX component can't create object: 'Wscript.Shell'
Code: 800A01AD
Source:  Microsoft VBScript runtime error

Cause

This error occurs if the script is unable to initialize an ActiveX object (in this case the Wscript.Shell object) during runtime.

Resolution

To resolve the problem, follow these steps:

Follow these steps only if you're receiving the 800A01AD error for Wscript.Shell component. For any other ActiveX object, the following steps does not apply:

Click Start, Run and type:

  • regsvr32 wshom.ocx
  • regsvr32 scrrun.dll

If the above does not help, or if you receive an error message when running the two commands above, then you may need to reinstall Windows Script 5.6 from Microsoft site. The download link is given below for Windows 2000 and XP systems.