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

所属分类: 脚本专栏 / vbs 阅读数: 1525
收藏 0 赞 0 分享

方法一:

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教程:函数-LCase 函数

VBS教程:函数-LCase 函数
收藏 0 赞 0 分享

VBS教程:函数-LBound 函数

VBS教程:函数-LBound 函数
收藏 0 赞 0 分享

VBS教程:函数-Join 函数

返回一个字符串,此字符串由包含在数组中的许多子字符串联接创建
收藏 0 赞 0 分享

VBS教程:函数-IsObject 函数

VBS教程:函数-IsObject 函数
收藏 0 赞 0 分享

VBS教程:函数-IsNumeric 函数

VBS教程:函数-IsNumeric 函数
收藏 0 赞 0 分享

VBS教程:函数-IsNull 函数

VBS教程:函数-IsNull 函数
收藏 0 赞 0 分享

VBS教程:函数-IsEmpty 函数

VBS教程:函数-IsEmpty 函数
收藏 0 赞 0 分享

VBS教程:函数-IsDate 函数

VBS教程:函数-IsDate 函数
收藏 0 赞 0 分享

VBS教程:函数-IsArray 函数

VBS教程:函数-IsArray 函数
收藏 0 赞 0 分享

VBS教程:函数-Int、Fix 函数

VBS教程:函数-Int、Fix 函数
收藏 0 赞 0 分享
查看更多