方法一:
Set wshell=CreateObject("WScript.Shell") wshell.Run """C:\Program Files00se0se.exe""",5,True Set wshell = Nothing
方法二:
temp="C:\Program Files00se30se.exe" path = Chr(34) & temp & Chr(34) Set wshell=CreateObject("WScript.Shell") wshell.Run path,1,True Set wshell = Nothing
方法三:
Public Const vbQuote = """" temp="C:\Program Files00se30se.exe" path = vbQuote & temp & vbQuote Set wshell=CreateObject("WScript.Shell") wshell.Run path,1,True Set wshell = Nothing
您可能感兴趣的文章:
- 批量替换快捷方式目的路径的VBS脚本
- 用vbs实现的确定共享文件夹的本地路径?
- vbs下一些取特殊路径的方法总结
- VBS 脚本不能运行 提示Windows无法访问指定设备路径或文件
- vbs获取当前路径的代码
- vbs中获取脚本当前路径的2个方法
本文由 华域联盟 原创撰写:华域联盟 » VBS中解决带空格路径的三种方法
转载请保留出处和原文链接:https://www.cnhackhy.com/17016.htm