帮助在vbscript中使用双引号 [英] Help using double quoatations in vbscript

查看:132
本文介绍了帮助在vbscript中使用双引号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网上找到了该应用程序,该应用程序在调用时需要传递一些参数,以便显示所需的信息.我可以将其与批处理文件一起使用,但是我需要转换几个vbscript才能使用此应用程序.下面是调用该应用程序的行:

I found this application online that requires some arguments to be passed to it when its called so it will display the information you want. I can get this to work with a batch file but i have several vbscripts that i need to convert inorder to use this application. below is the line that calls the application:

start "Loginscript" "%~dp0Progressbar.exe" /Max:10 /HideParent:1 /CloseWithParent:1 /Title:"Testing Remote Fix" /Status:"Running Fix..." /CommandFolder:"%Temp%\PB_%UserName%" /SilentlyContinue:1 


现在,这就是即时消息在我的批处理文件中使用的内容,并且带有引号的区域需要使它们生效.我尝试使用:


Now this is what im using in my batch files and the area''s that have quatation marks need to have them inorder to work. I have tried using:

Dim WshShell
Set WshShell = WScript.CreateObject("Wscript.Shell")


然后我将使用WshShell.run并列出exe所在的路径,然后在其后立即调用参数,但是当我添加类似/status的项目时:"waiting"(我正在等待),我得到错误提示,指出找不到该文件.我一直在浏览google,发现有关双引号的信息,但我很难将其投入使用.我刚开始编写脚本,需要一些帮助来使其正常工作.谢谢您的帮助.


and then i would use WshShell.run and would list the path the exe is located at and then call the arguments right after it but when i add items like /status:"waiting" i get the error stating that the file cant be found. I have been looking through google and found information on double quotations and i m having a hard time getting it to work. I just started with scripting and need some help getting this to work. Thank you for your help.

推荐答案

如果要在VBScript的字符串中包含double quotes,请尝试在""中将""换成" .在此处使用""解决了作为类似问题的字符串
http://www.codeproject.com/Messages/4224777/Re-Regular-Expressions-dealing-with-a-quote.aspx [
If you want to include double quotes within a string in VBScript then please try "" for " within the string as a similar issue was solved using "" here
http://www.codeproject.com/Messages/4224777/Re-Regular-Expressions-dealing-with-a-quote.aspx[^]


这篇关于帮助在vbscript中使用双引号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆