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

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

程序员文章站 2022-03-21 16:41:43
方法一: set wshell=createobject("wscript.shell") wshell.run """c:\program files\3...

方法一:

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