Search the Site

Sponsors

bottom corner

Running VBScript in 32-bit mode on a 64-bit Windows machine

This article shows a simple step to take to run a VBScript file in 32-bit mode on a 64-bit Windows machine.

This page is filed under keyword(s): windows, vbscript.

I have a legacy VBScript program that has been recently been migrated to a new 64-bit Windows server by a system administrator due to a policy set by a higher power. By default, VBScript executed in 64-bit Windows automatically runs as a 64-bit program. Because I have reasons to have this program run in 32-bit mode, I modified my batch file to execute my program in a different way.

This is the BEFORE picture. When this batch file is run in 64-bit Windows, it will execute in 64-bit mode.

time /t
cscript ThisIsMyVbscriptProgram.vbs
time /t

Below is the AFTER picture. Note that I am passing my script into a new command prompt environment in the Windows SYSWOW64 folder; this new environment is strictly in 32-bit mode.

time /t
%WINDIR%\SYSWOW64\cmd.exe /c cscript ThisIsMyVbscriptProgram.vbs
time /t

As a side note: WOW stands for "Windows on Windows".

Did you find this page useful? Please consider browsing other articles or subscribing to the RSS feed to keep up with latest.

This page is filed under keyword(s): windows, vbscript.
Author: C. Peter Chen
Last updated: 8 Dec 2014

bottom corner