![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-04 07:57 |
48,038 topics / 350,123 posts / today 0 new / 48,251 members |
| DOS批处理 & 脚本技术(批处理室) » Error when writing two " symbols in VBS? |
| Printable Version 801 / 5 |
| Floor1 ngela | Posted 2007-04-18 06:37 |
| 初级用户 Posts 10 Credits 28 | |
|
I already put ^ in front of them. It says missing )
dim ws set ws = wscript.createobject ("wscript.shell") ireturn = ws.Run("cmd.exe /c echo net start ^| find ^"DHCP Client^">>a.bat", 0, TRUE) Please help and see how this should be done. [ Last edited by ngela on 2007-4-17 at 05:38 PM ] |
|
| Floor2 marcoak | Posted 2007-04-18 06:47 |
| 初级用户 Posts 22 Credits 42 | |
|
In VBS, ^ means exponentiation. What are you using exponentiation for? VBS concatenation seems to use & instead!
|
|
| Floor3 zh159 | Posted 2007-04-18 07:02 |
| 金牌会员 Posts 1,467 Credits 3,687 | |
|
In VBS, for double quotes you need to use & """" &
|
|
| Floor4 slore | Posted 2007-04-18 07:09 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
| Floor5 ngela | Posted 2007-04-18 12:25 |
| 初级用户 Posts 10 Credits 28 | |
|
Adding ^ before the | in reply #3 works.
The one in reply #4 says the system cannot find the file specified. Thanks, everyone. |
|
| Floor6 slore | Posted 2007-04-19 08:38 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |