Why vbscript calling bat file calling java program won't work in Windows 7? - TechRepublic
Question
February 20, 2012 at 08:01 AM
dalesprague

Why vbscript calling bat file calling java program won’t work in Windows 7?

by dalesprague . Updated 14 years, 4 months ago

I have a bat file that calls a java program which transfers some files to another server and then deletes the files that were just transferred from my local machine. This works great in XP and in Windows 7 when I run the bat file myself. I’m set up as an administrator on my machine and I have UAC at the lowest level on this machine.

I had a tech/automation specialist write a vbscript that we use in QuickTestPro that will move some files to the proper transfer directory to be transferred then the vbscript uses wscript.shell to call this bat file so that we can transfer the files. The script is farily simple and is shown below.

Set objWSHShell=CreateObject(“wscript.shell”)
objWSHShell.Run strBatchCall, 1, True
Set objWSHShell=Nothing

strBatchCall is merely the full path and file name of the bat file that I want to call.

When the tech wrote this she was on a Windows XP machine and the script worked just fine. When I try to run it on my Windows 7 machine it won’t work. The bat file is called and every command in the script that is not related to the calling of the Java program works.

The call of the java program is fairly simple and as I said works when running as administrator just fine but doesn’t work when called this way.

java -jar myClient.jar -upld “.*”

Anyone have any thoughts or ideas. This is pretty crucial to an automation effort that has to occur.

This discussion is locked

All Comments