| 标题 | VBS中解决带空格路径的三种方法 |
| 范文 | 我们在使用VBS的时候,经常会遇到路径中带有空格的状况,直接使用的话,脚本会报错,那么我们如何处理呢,这里给大家总结了常用的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 |
| 随便看 |
|
在线学习网范文大全提供好词好句、学习总结、工作总结、演讲稿等写作素材及范文模板,是学习及工作的有利工具。