Thursday, November 15, 2012

Running VBScripts on Vista/Win 7 64 bit computers

Sometimes while running vbscripts on Win 7 64 bit computers, the script gives errors in creating objects or unable to access shares.

The reason is that vbscripts are being executed as 64 bit scripts.

Some DLLs do not support 64 bits, so the script has to be run wit hthe 32 bit version of WScript.exe from the directory %SystemRoot%\SysWOW64 or the global Registry setting has to be changed:
HKEY_CLASSES_ROOT\VBSFile\Shell\Open\Command
(Standard) from
"%SystemRoot%\System32\WScript.exe" "%1" %*
to
"%SystemRoot%\SysWOW64\WScript.exe" "%1" %*

No comments:

Post a Comment