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-06-26 01:54
中国DOS联盟论坛 » 其它操作系统综合讨论区 » How to shut down the computer from DOS View 17,297 Replies 27
Floor 16 Posted 2006-05-22 15:32 ·  中国 广东 汕头 电信
初级用户
Credits 60
Posts 20
Joined 2006-05-22 15:20
20-year member
UID 55793
Gender Male
From 神秘的小岛
Status Offline
I support the 8th floor~!
If you are still willing to go to the DOS to type those commands tirelessly.
Congratulations, there is a program RE.EXE in DOS that can support restarting DOS, and there is a program OFF.EXE that can support shutting down in DOS.
If you need the above two programs, you can contact me!
Floor 17 Posted 2007-08-13 06:14 ·  中国 江苏 南京 电信
初级用户
Credits 76
Posts 39
Joined 2007-03-09 06:54
19-year member
UID 81169
Gender Male
Status Offline
I came across an old post, which is quite interesting.
I'm very interested in re.exe, off.exe, and climbing's shutdown.exe.
It would be great to have the original code.
狐狸喜欢狡猾。。
Floor 18 Posted 2007-08-13 15:06 ·  中国 北京 鹏博士BGP
初级用户
Credits 71
Posts 30
Joined 2006-12-14 08:42
19-year member
UID 73492
Gender Male
Status Offline
You can write a sentence with DEBUG
ffff:0000
Just run it!
Floor 19 Posted 2007-08-14 15:08 ·  IANA 局域网IP(Private-Use)
初级用户
★★
Credits 113
Posts 51
Joined 2007-02-15 22:54
19-year member
UID 79590
Gender Male
Status Offline
Originally posted by chineselgs at 2006-5-11 04:28 PM:
Hello everyone,
I'm a new user with limited knowledge.
There's an unclear matter I've had,
Hope you all can give me some advice





Hehe, I was happy for a moment and wrote a limerick~~~ Trouble you...



You can use the Restart command to restart under pure DOS.
Floor 20 Posted 2007-08-16 20:32 ·  中国 河北 唐山 联通
银牌会员
★★★
Credits 1,148
Posts 514
Joined 2007-06-01 12:51
19-year member
UID 89959
Gender Male
From 河北
Status Offline
xp Running Commands

ShutDown Command 2006-10-30 00:39
Usage: shutdown <-i | -l | -s | -r | -a> <-f> <-m \computername> <-t xx> <-c "comment"> <-d up:xx:yy>

at 22:00 Shutdown -s

No parameters Display this message (same as ?)
-i Display GUI interface, must be the first option
-l Log off (cannot be used with option -m)
-s Shut down this computer
-r Shut down and restart this computer
-a Abort system shutdown
-m \computername Shut down/restart/abort remote computer
-t xx Set shutdown timeout to xx seconds
-c "comment" Shutdown comment (maximum 127 characters)
-f Force running applications to close without warning
-d
:xx:yy Shutdown reason code
u is user code
p is a planned shutdown code
xx is a major reason code (positive integer less than 256)
yy is a minor reason code (positive integer less than 65536)
-f: Force close applications
-m \computer name: Control remote computer
-i: Display graphical user interface, but must be the first option of Shutdown
-l: Log off current user
-r: Shutdown and restart
-t time: Set shutdown countdown
-c "message content": Enter message content in shutdown dialog (cannot exceed 127 characters

2. Examples:

Shut down computer shutdown –s (Method: "Start" -> "Run" -> "shutdown -s" -> "OK")

Shut down computer with 3-second delay shutdown –s –t 3 (Method: "Start" -> "Run" -> "shutdown –s –t 3" -> "OK")

Cancel shutdown computer shutdown –a (Method: "Start" -> "Run" -> "shutdown –a" -> "OK")

3. Applications:
(1) If you want to automatically shut down the computer after 1 hour, for example: You are downloading a software or a movie, and you have an urgent matter to go to Lishui, what will you do? Stop downloading? It's a pity! Continue? How to shut down the computer after downloading? Don't worry! You can use this command to solve:

shutdown –s –t 3600 (The system shuts down the computer after 3600 seconds, time is customizable)

You can rest assured to go to Lishui, and don't have to worry about your computer being on for a long time.

(2) RPC vulnerability causes countdown automatic shutdown, use this command to cancel countdown automatic shutdown:

shutdown –a (Method: "Start" -> "Run" -> "shutdown –a" -> "OK")

A while ago, network viruses were very rampant, such as Slammer, Blaster, etc., which were designed for the RPC (Remote Procedure Call) vulnerability of Windows XP, which caused the system to countdown automatic shutdown, which troubled many students and teachers. As shown in the following figure:



(3) Use Shutdown command to achieve network unified shutdown

  My unit often has many teachers not turning off computers after work, and the leader found out and required to solve this problem. I thought if I went to each office to check, it would take a lot of time, so I thought whether I could turn off all machines through one computer. Because all office computers are installed with Windows XP system, I thought of using the remote shutdown "Shutdown" command. The specific method is as follows:

  Step 1 Click "Start → Run", enter "Gpedit.msc" in the dialog box, click <OK>, and open the "Group Policy Editor".

  Step 2 In the "Group Policy Editor" window, open "Computer Configuration → Windows Settings → Security Settings → Local Policies → User Rights Assignment" on the left, select "Force shutdown from a remote system" in the right window. The pop-up dialog shows that only members of the "Administrators" group can remotely shut down; click the <Add User or Group> button at the bottom of the dialog, then enter "Heyongsheng" (administrator account) in the pop-up dialog, and then click <OK>.

  Step 3 At this time, a "Heyongsheng" user is added in the properties of "Force shutdown from a remote system", click <OK>, and finally close the "Group Policy Editor" window.

  After performing the above operations on the computers in each office, we granted the "Heyongsheng" user of each computer the right to remotely shut down. When it's time to get off work, I just need to perform the following operations on my own machine:

  Step 4 Click "Start → Run", enter "Shutdown -I" in the dialog box, and the "Remote Shutdown" dialog box will be displayed on the screen (Figure 1).
Figure 1 Remote shutdown control window
(4) Use XP's ShutDown.exe to realize server timing restart
The shutdown of Windows XP is controlled by the Shutdown.exe program, which is located in the WindowsSystem32 folder. If you want Windows 2000 to achieve the same effect, you can copy Shutdown.exe to the system directory System32.
First of all, it is required that the motherboard must support software shutdown function, otherwise you have to press the power switch in person to shut down. Now the motherboards generally support software shutdown. Operation steps: Click "Start"/Program/Accessories/System Tools "Scheduled Tasks", pop up the scheduled tasks window, then double-click "Add Scheduled Task", run the "Scheduled Task Wizard", press "Browse", find the Rundll32.exe file in the WINDOWS directory, click "Open" button, type the name of the task (such as "Scheduled Shutdown") in the appearing dialog box, select "Daily" for the execution method, then press "Next" to select the scheduled shutdown time (you can first test it 1 minute later than the time displayed on the current machine), next select "Open the advanced properties of this task when clicking Finish", click "Finish", and finally right-click "Scheduled Shutdown" to open the properties, enter "C:WINNTsystem32shutdown.exe -r -t 1" in the run bar, click "OK" soon, OK.
4. Conclusion: The shutdown command in Windows XP is very powerful, you can try to use it, dig out the functions, and serve us.

SHUTDOWN.EXE command under DOS system SHUTDOWN S (Shut down) SHUTDOWN R (Restart)

[ Last edited by shanliang8008 on 2007-8-16 at 08:41 PM ]
Floor 21 Posted 2007-08-23 13:41 ·  中国 湖南 衡阳 电信
中级用户
★★
Credits 322
Posts 144
Joined 2007-01-10 13:00
19-year member
UID 76062
Gender Male
Status Offline
Who cares about permissions!!!!!

Just unplug the power plug to shut down
Floor 22 Posted 2007-08-23 20:02 ·  中国 北京 电信
初级用户
Credits 22
Posts 11
Joined 2006-12-11 05:17
19-year member
UID 73161
Gender Male
Status Offline
Try downloading the 98dos shutdown command. There should be it on DOS Home.
Floor 23 Posted 2007-08-28 07:57 ·  中国 湖北 黄冈 电信
初级用户
★★
Credits 153
Posts 54
Joined 2007-06-20 18:24
19-year member
UID 91903
Gender Male
Status Offline
Originally posted by akin520 at 2007-8-13 03:06 PM:
You can write a sentence with DEBUG
ffff:0000
Just run it!

What is this, shutting down or restarting, and how to write them respectively
Floor 24 Posted 2007-08-28 18:45 ·  中国 广东 阳江 电信
初级用户
Credits 92
Posts 49
Joined 2006-10-22 12:22
19-year member
UID 67712
Gender Male
Status Offline
This might be a bit difficult, I don't understand this.
Floor 25 Posted 2010-07-22 17:29 ·  中国 广西 梧州 苍梧县 电信
新手上路
Credits 4
Posts 2
Joined 2010-07-22 05:11
15-year member
UID 170940
Gender Male
Status Offline
Run `shutdown /s` in vmeare to successfully power off. I wonder if it will cause damage to the hard disk if it's on a real machine?
Floor 26 Posted 2011-01-19 15:12 ·  中国 山东 淄博 联通
初级用户
Credits 36
Posts 32
Joined 2010-10-09 22:49
15-year member
UID 175594
Gender Male
Status Offline
8_lou, you are too...! ! !
LZ, doing this will lose data, and then you won't be able to play DOS...
Floor 27 Posted 2011-01-24 09:42 ·  中国 山东 菏泽 联通
银牌会员
★★★
Credits 1,246
Posts 488
Joined 2003-11-11 00:00
22-year member
UID 12699
Gender Male
Status Offline
Originally posted by Climbing at 2006-5-18 03:03 AM:
The poster try this command:
http://nufans.net/clone/systools/shutdown.exe

Usage is similar to XP's shutdown, to shut down:
shutdown -u -f -t 0

Note that this is not the one built into XP, this ...



http://www.aumha.org/downloads/shutdown.zip
Floor 28 Posted 2018-10-06 23:13 ·  中国 天津 南开区 联通
初级用户
Credits 22
Posts 13
Joined 2018-10-04 19:38
7-year member
UID 183122
Gender Male
Status Offline
Shut down the DOS machine by pressing the power switch of the machine
Forum Jump: