Sub Force32Bit() 'If script is running on 64 bit, re-run the script with a 32-bit engine Dim fs, strExe32Path, strCmd, intArg Set fs = CreateObject("Scripting.FileSystemObject") 'If this is a dual 32/64-bit OS, then the SysWOW folder script executable will exist strExe32Path = fs.BuildPath(fs.GetSpecialFolder(0), "SysWOW64\" & fs.GetFileName(WScript.FullName)) If fs.FileExists(strExe32Path) Then 'So the SysWOW script file exists! But are we already running it? If WScript.FullName <> strExe32Path Then 'Since the executable paths don't match, we must not be running 32-bit. strCmd = strExe32Path 'Add quotes in case engine has spaces in the path If Left(strCmd, 1) <> """" Then strCmd = """" & strCmd & """" End If 'Add the script name (with quotes just in case) strCmd = strCmd & " """ & WScript.ScriptFullName & """" 'Add arguments if there are any If WScript.Arguments.Count > 0 Then For intArg = 0 To WScript.Arguments.Count - 1 'If there is a space in an argument, add quotes around the argument If InStr(WScript.Arguments(intArg), " ") <> 0 Then strCmd = strCmd & " """ & WScript.Arguments(intArg) & """" Else strCmd = strCmd & " " & WScript.Arguments(intArg) End If Next End If 'Run the script again with the 32-bit engine. Kill this 64-bit script. CreateObject("Wscript.Shell").Run strCmd, 1, False WScript.Quit End If End If End Sub