China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-02 06:54
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Can the result be obtained when wshshell.run in VBS calls a DOS command? View 1,551 Replies 2
Original Poster Posted 2006-10-12 04:19 ·  中国 浙江 温州 电信
中级用户
★★
Credits 458
Posts 196
Joined 2006-10-05 12:04
19-year member
UID 64614
Status Offline
Little brother wants to write a VBS script to call the netstat command.

The current method is to use run to call netstat>*.txt, and then use fso to read the content in *.txt and assign it to a variable.

May I ask all the experts, can the result of the netstat command be directly assigned to a variable after wshshell.run runs the netstat command in VBS, skipping the two steps of writing and then reading?
Floor 2 Posted 2006-10-12 04:45 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 3 Posted 2006-10-13 01:41 ·  中国 浙江 温州 电信
中级用户
★★
Credits 458
Posts 196
Joined 2006-10-05 12:04
19-year member
UID 64614
Status Offline
Originally posted by electronixtar at 2006-10-12 04:45:
http://www.cn-dos.net/forum/viewthread.php?tid=21082&fpage=1&highlight=vbs

Search more, check old threads more


Thanks:P The script is written:D

When using exec to call, a black box appears. Is it impossible to remove??:)
Forum Jump: