1

QUESTION: On a 64 bit machine, is there a way to set "GLOBALLY" .VBS use of "c:\windows\syswow64\wscript.exe" and prevent the use defaulting to "c:\windows\system32\wscript.exe"?

PROBLEM: There are two versions of Wscript.exe, 32bit and 64bit. Despite changing associations in Default Programs > Associations under control panel, or trying to push using Environment Variables, it continues to default to the 64bit version of wscript.exe.

RESULTING ISSUE: When I launch my scripts, they create at 32bit object, that is not available as a 64bit object, resulting in the script host error "cannot create activeX object...". When I click to run these scripts on my desktop, they fail due to this issue.

Thanks!

  • 1
    Possible duplicate of [How do I run a VBScript in 32-bit mode on a 64-bit machine?](http://stackoverflow.com/questions/2806584/how-do-i-run-a-vbscript-in-32-bit-mode-on-a-64-bit-machine) – JosefZ Apr 29 '16 at 21:45
  • 1
    Hi JosefZ! Thanks for the reply. This is not a duplicate, I know how it can be done, but that is simply just a workaround. I cannot do that for hundereds of scripts. I should be able to associate any vbs file, without exception, to run under 32 bit. I should be able to override the Windiows default. However, through the control panel this isn't possible. There is a setting in the Registry HKCR associations. Maybe someone know how to do it there? –  May 03 '16 at 22:17
  • 1
    I wouldn't go in direct registry manipulation as there are too much relationship (dependence, reference) to other keys / classes, see `reg query HKCR\VBSFile /S`. I'd add some [chosen launcher](http://stackoverflow.com/a/15320768/3439404) upside every `.vbs` file using a newly-written script (not difficult task to write such a script: test every `.vbs` file and add the launcher if not present yet; take care of next hitch: if used, the `Option Explicit` statement must appear in a script before any other statements). – JosefZ May 04 '16 at 10:45
  • 1
    Thanks I will try that! –  May 04 '16 at 14:57

0 Answers0