作者:ACHEn大魔王 | 来源:互联网 | 2023-05-18 13:10
我有这个脚本:
Set WshShell = CreateObject("WScript.Shell")
dim a
a = "C:\Program Files (x86)\MyProgram\MyApplication.jar"
WshShell.Run "javaw -jar " & a
但是当我执行时,我收到错误消息:"错误:无法访问jarfile:C:\ Program"
问题是......我的程序路径包含空格.如何解决这个问题?
1> Pasupathi Ra..:
你能试试吗?这对我有用.
Set WshShell = CreateObject("WScript.Shell")
dim a
a = "C:\Program Files (x86)\MyProgram\MyApplication.jar"
WshShell.Run "java -jar " & chr(34) & a & chr(34)