Wscript help please!

Associate
Joined
6 Feb 2004
Posts
1,357
Location
Toon
Hi all

I'm trying to get a script to work on a 64-bit machine, basically at work we have several scripts we need to run which update information in Access databases, and as more and more machines are running x64 I want to be able to update the scripts so they work on this environment. Problem is nobody (including me!) knows anything about scripting.

I wasn't going to let that stop me though :D so I found this this link

When I initially tried running it, it failed giving the error Line: 1 Char: 50 Error: Expected end of statement. The 50th character in line1 for me is a semicolon, changing it to a colon seemed to get the script to run further, so I guess this may have helped?!

I'm now stuck on line 4, I get the error below:

1.jpg


My line 4 currently reads:

if(host.indexOf("system32") != -1 && cpu == "amd64")

Help!
 
Last edited:
Oh I see (I think). So if I have several VBscript files that currently don't run on x64 ( I get the error 'Provider cannot be found. It may not be properly installed'), but work fine on x86, how to I get them to run?
 
Hi Mate - I trusted you a message with one example, the code isn't particularly confidential, but I'm not sure I should post it on a public forum. Interested to hear your thoughts.
 
Hi Mate

I had worked that out, only problem is the script must be located in the same folder as the database in order to work. This would vary on each users machine, so that 'file.vbs' part would need to specifically point to the folder locating the script and the database.
 
Neither is really an option unfortunately, never mind, I assumed this was going to be easier than it actually is. Thanks for your help though.
 
Actually JHeaton I just tried adding C:\windows\syswow64\wscript.exe file.vbs to a batch file and that does work as long as the batch file which executes the vbs exists in the same folder as the script. This is the best workaround for me I think, so thanks!
 
Back
Top Bottom