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-27 05:24
中国DOS联盟论坛 » 其它操作系统综合讨论区 » [Help] How to add a restart command in a batch file View 1,511 Replies 8
Original Poster Posted 2007-08-03 16:30 ·  中国 浙江 温州 电信
初级用户
Credits 28
Posts 12
Joined 2007-05-24 16:02
19-year member
UID 89174
Gender Male
Status Offline
How to add a restart command in batch processing. The system is Windows 2000 Professional. I found the command iisreset/reboot after searching for a long time, but I don't know how to use it. Is there any expert who knows and can tell me?
Floor 2 Posted 2007-08-03 16:35 ·  中国 江苏 南京 电信
初级用户
Credits 36
Posts 14
Joined 2006-10-20 02:07
19-year member
UID 67110
Gender Male
Status Offline
That seems to be for restarting IIS, right? I'm also a newbie, just started learning this, and I don't know either.
Floor 3 Posted 2007-08-03 18:45 ·  中国 浙江 温州 电信
初级用户
Credits 28
Posts 12
Joined 2007-05-24 16:02
19-year member
UID 89174
Gender Male
Status Offline
Is there no command to restart?
Floor 4 Posted 2007-08-03 21:35 ·  中国 天津 电信
银牌会员
★★★
Credits 1,928
Posts 931
Joined 2007-01-06 11:46
19-year member
UID 75624
Gender Male
Status Offline
Is it a system reboot?

shutdown -r
Floor 5 Posted 2007-08-03 22:06 ·  中国 浙江 温州 电信
初级用户
Credits 28
Posts 12
Joined 2007-05-24 16:02
19-year member
UID 89174
Gender Male
Status Offline
Is shutdown a feature in XP?
Floor 6 Posted 2007-08-03 22:11 ·  中国 广东 深圳 罗湖区 电信
新手上路
Credits 2
Posts 1
Joined 2007-08-03 21:49
19-year member
UID 94601
Gender Male
Status Offline
Originally posted by wudixin96 at 2007-8-3 09:35 PM:
Is it a system restart?

shutdown -r


That's right upstairs!
Floor 7 Posted 2007-08-04 19:44 ·  中国 天津 联通
新手上路
Credits 8
Posts 4
Joined 2007-08-04 18:03
19-year member
UID 94644
Gender Male
Status Offline
200 doesn't have this. Copying the shutdown from XP to 2000 should work.
Floor 8 Posted 2007-08-05 00:44 ·  中国 浙江 温州 电信
初级用户
Credits 28
Posts 12
Joined 2007-05-24 16:02
19-year member
UID 89174
Gender Male
Status Offline
I also copied SHUTDOWN from XP and it works. Thanks
Floor 9 Posted 2007-08-05 08:20 ·  中国 河北 廊坊 三河市 移动
金牌会员
★★★★
Credits 2,725
Posts 1,160
Joined 2006-09-23 12:00
19-year member
UID 63486
From 河北廊坊
Status Offline
It can be done with VBS.
Set colOperatingSystems = GetObject("winmgmts:{(Shutdown)}").ExecQuery("Select * from Win32_OperatingSystem") 
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Win32Shutdown(12)
Next
三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。
Forum Jump: