Original Poster
Posted 2007-04-18 06:37 · 中国 广东 湛江 电信
初级用户
★
Credits 28 Posts 10 Joined 2007-02-19 09:47 19-year member UID 79788 Gender Male
Status Offline
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 ]
Floor 2
Posted 2007-04-18 06:47 · 中国 四川 成都 电信
初级用户
★
Credits 42 Posts 22 Joined 2005-10-16 12:31 20-year member UID 43580
Status Offline
In VBS, ^ means exponentiation. What are you using exponentiation for? VBS concatenation seems to use & instead!
Floor 3
Posted 2007-04-18 07:02 · 中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687 Posts 1,467 Joined 2005-08-08 12:00 20-year member UID 44210
Status Offline
In VBS, for double quotes you need to use & """" &
ireturn = ws.Run("cmd.exe /c echo net start | find " & """" & "DHCP Client" & """" & ">>a.bat", 0, TRUE)
Floor 4
Posted 2007-04-18 07:09 · 中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212 Posts 2,478 Joined 2007-02-08 23:39 19-year member UID 79003 Gender Male
Status Offline
Floor 5
Posted 2007-04-18 12:25 · 中国 广东 湛江 电信
初级用户
★
Credits 28 Posts 10 Joined 2007-02-19 09:47 19-year member UID 79788 Gender Male
Status Offline
Adding ^ before the | in reply #3 works.
The one in reply #4 says the system cannot find the file specified.
Thanks, everyone.
Floor 6
Posted 2007-04-19 08:38 · 中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212 Posts 2,478 Joined 2007-02-08 23:39 19-year member UID 79003 Gender Male
Status Offline
Forum Jump:
— Select —
站务公告 & 版主讨论
意见反馈 & 网友交流
DOS学习入门 & 精彩文章 (教学室)
DOS疑难解答 & 问题讨论 (解答室)
DOS启动盘 & LOGO技术 (启动盘室)
DOS批处理 & 脚本技术(批处理室)
DOS媒体世界 & 网络技术 (多媒体室)
DOS汉化世界 & 中文系统 (中文化室)
DOS开发编程 & 发展交流 (开发室)
DOS软件下载 & 游戏分享 (下载室)
GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区
其它操作系统综合讨论区
WinPE、PowerShell及其它命令行系统专区
贴图灌水、文学娱乐专区
网络日志(Blog)
论坛回收站
├ 链接失效,待修正