0

I am executing a vbs on 2 machines (both 64 bit machines). On both the machines, 64 bit MySQL ODBC driver is installed. In the vbs, there is code to connect to MySQL DB and perform some actions.

In 1 machine, it is getting executed when I type following in cmd window: C:\Windows\SysWoW64\cscript.exe //NoLogo filepath\xyz.vbs

whereas in other machine, it is getting executed when I type following in cmd window: C:\Windows\System32\cscript.exe //NoLogo filepath\xyz.vbs

Please help me understand the behavior.

Shouldn't the below code be executed in both the machines as both the machines are 64 bit and also ODBC drivers installed are 64 bit: C:\Windows\System32\cscript.exe //NoLogo filepath\xyz.vbs

Vijay Gupta
  • 21
  • 1
  • 7
  • `C:\Windows\SysWoW64\cscript.exe` is the 32-bit interpreter, so you're probably using a 32-bit ODBC driver on that machine. Double check the driver architecture. Do you get an error when running with the 64-bit interpreter on that system? If so, what does it say? – Ansgar Wiechers May 02 '16 at 17:21
  • @Ansgar - Thanks for the reply. My bad. 32 bit odbc driver was installed on first machine. I installed 64 bit odbc driver on that machine and now following command works which is expected: C:\Windows\System32\cscript.exe //NoLogo filepath\xyz.vbs but now, when i double click on the vbs file on the same machine, it gives me error: data source name not found and no default driver specified. why is that using 32 bit interpreter (by default) on double clicking that file? – Vijay Gupta May 02 '16 at 19:30
  • [Maybe](https://social.technet.microsoft.com/Forums/sharepoint/en-US/7abcbee3-9716-478a-a62c-5e982b1419a2/vb-script-connects-to-access-db-in-windows-2008-r2-data-source-name-not-found-and-no-default?forum=winservergen) [related](http://stackoverflow.com/q/283460/1630171). – Ansgar Wiechers May 02 '16 at 22:41

0 Answers0