I had been able to start this program previously with the following code:
dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
strCmd = "cmd.exe /c start /D C:\Jts C:\Windows\system32\javaw.exe -cp jts.jar;total.2012.jar -Dsun.java2d.noddraw=true -Dswing.boldMetal=false -Dsun.locale.formatasdefault=true -Xmx768M -XX:MaxPermSize=128M jclient/LoginFrame C:\Jts"
WshShell.Run(strCmd)
Now, however, thanks to a wonderful java
update, my java.exe
file is located here:
C:\Program Files (x86)\Java\jre1.8.0_31\bin\javaw.exe
I am having trouble replacing the strCmd
variable above so that my VBScript
doesn't error out. I know it has to do with the spacing in Program Files (x86)
and i have tried to implement this answer: How to use spaces in CMD?
but it doesn't seem to be working. Please help and explain what these spaces do please.
EDIT:
I just figured it out. God, I hate spaces. Apparently this worked, I would like to know if this is the best solution or not:
strCmd = "cmd.exe /c start /D C:\Jts C:\""Program Files (x86)""\Java\jre1.8.0_31\bin\javaw.exe -cp jts.jar;total.2012.jar -Dsun.java2d.noddraw=true -Dswing.boldMetal=false -Dsun.locale.formatasdefault=true -Xmx768M -XX:MaxPermSize=128M jclient/LoginFrame C:\Jts"