首页 > 编程 > VBScript > 正文

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

2020-07-26 11:45:24
字体:
来源:转载
供稿:网友

方法一:

Set wshell=CreateObject("WScript.Shell")wshell.Run """C:/Program Files/360/360se/360se.exe""",5,TrueSet 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,TrueSet wshell = Nothing 

方法三:

Public Const vbQuote = """"temp="C:/Program Files/360/360se3/360se.exe"path = vbQuote & temp & vbQuoteSet wshell=CreateObject("WScript.Shell")wshell.Run path,1,TrueSet wshell = Nothing

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表