欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

VBS中解决带空格路径的三种方法

程序员文章站 2022-04-12 09:27:48
...
方法一:
Set wshell=CreateObject("WScript.Shell")
wshell.Run """C:\Program Files\360\360se\360se.exe""",5,True
Set wshell = Nothing

方法二:

temp="C:\Program Files\360\360se3\360se.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 Files\360\360se3\360se.exe"
path = vbQuote & temp & vbQuote
Set wshell=CreateObject("WScript.Shell")
wshell.Run path,1,True
Set wshell = Nothing

更多VBS中解决带空格路径的三种方法相关文章请关注PHP中文网!

相关标签: vbs 路径空格