『第 20 楼』:
使用 LLM 解释/回答一下
xp运行命令
ShutDown命令2006-10-30 00:39用法: shutdown <-i | -l | -s | -r | -a> <-f> <-m \computername> <-t xx> <-c "comment"> <-d up:xx:yy>
at 22:00 Shutdown -s
没有参数 显示此消息(与 ? 相同)
-i 显示 GUI 界面,必须是第一个选项
-l 注销(不能与选项 -m 一起使用)
-s 关闭此计算机
-r 关闭并重启动此计算机
-a 放弃系统关机
-m \computername 远程计算机关机/重启动/放弃
-t xx 设置关闭的超时为 xx 秒
-c "comment" 关闭注释(最大 127 个字符)
-f 强制运行的应用程序关闭而没有警告
-d
:xx:yy 关闭原因代码
u 是用户代码
p 是一个计划的关闭代码
xx 是一个主要原因代码(小于 256 的正整数)
yy 是一个次要原因代码(小于 65536 的正整数)
-f:强行关闭应用程序
-m \计算机名:控制远程计算机
-i:显示图形用户界面,但必须是Shutdown的第一个选项
-l:注销当前用户
-r:关机并重启
-t时间:设置关机倒计时
-c "消息内容":输入关机对话框中的消息内容(不能超127个字符
2、举例:
关闭计算机 shutdown –s (方法:”开始”->”运行”->”shutdown -s”->”确定”)
延迟3秒关闭计算机 shutdown –s –t 3(方法:”开始”->”运行”->”shutdown –s –t 3”->”确定”)
取消关闭计算机 shutdown –a (方法:”开始”->”运行”->”shutdown –a”->”确定”)
3、应用:
(1)您如果想在1小时后自动关闭计算机,比如:您正在下载一个软件或一部电影,而您有急事要去丽水,您会怎么办?停止下载?太可惜了!继续?下载完后电脑怎么关闭?不用愁!您可以使用该命令解决:
shutdown –s –t 3600 (系统在3600秒后关闭计算机,时间自定)
您就放心地去丽水了,而不用担心您的计算机长期开着了。
(2)出现RPC漏洞而导致倒计时自动关机,使用该命令取消倒计时自动关机:
shutdown –a (方法:”开始”->”运行”->”shutdown –a”->”确定”)
前一段时间的网络病毒非常猖獗,如震荡波、冲击波等就是针对WindowsXP的RPC(远程过程调用)漏洞设计的,它导致系统倒计时自动关机,很多同学、老师头痛不已。如下图:
(3)利用Shutdown命令 实现网络统一关机
笔者所在单位下班后常有很多老师不关电脑,领导发现后要求解决这个问题。我想如果到各办公室去查看,这很费时,于是就想能否通过一台电脑把所有的机器都关掉。因为所有的办公用机安装的都是Windows XP系统,就想到了使用远程关机“Shutdown”命令。具体方法如下:
步骤1 单击“开始→运行”,在对话框中输入“Gpedit.msc”,单击<确定>,打开“组策略编辑器”。
步骤2 在“组策略编辑器”窗口的左边打开“计算机配置→Windows设置→安全设置→本地策略→用户权利指派”,在右边的窗口选择“从远端系统强制关机”。在弹出的对话框中显示目前只有“Administrators”组的成员才有权远程关机;单击对话框下方的<添加用户或组>按钮,然后在弹出的对话框中输入“Heyongsheng”(管理员账号),再单击<确定>。
步骤3 这时在“从远端系统强制关机”的属性中便添加了一个“Heyongsheng”用户,单击<确定>,最后关闭“组策略编辑器”窗口。
对各办公室的电脑进行上述操作后,我们便给每台计算机的“Heyongsheng”用户授予了远程关机的权限。到下班时,我只要在自己的机器上进行以下操作:
步骤4单击“开始→运行”,在对话框中输入“Shutdown -I”,屏幕上将显示“远程关机”对话框(图1)。
图1 远程关机控制窗口
(4)用XP的ShutDown.exe实现服务器定时重启
Windows XP的关机是由Shutdown.exe程序来控制的,位于WindowsSystem32文件夹中。如果想让Windows 2000也实现同样的效果,可以把Shutdown.exe复制到系统目录System32下。
首先当然要求主板必须支持软件关机功能,否则你还得亲自去按电源开关才能关机,现在的主板一般都支持软件关机。操作步骤:单击“开始”/程序/附件/系统工具中"计划任务",弹出计划任务窗口,然后双击"添加已计划的任务",运行“计划任务向导”,按“浏览”,找到WINDOWS目录中的Rundll32.exe 文件,单击"打开"按钮,在出现的对话框中键入该任务的名字(如"定时关机"),执行方式选择“每天” ,然后按“下一步”选择定时关机时间(可以先试一下比现在机器上显示的时间晚1分钟),下一步选中“当单击完成打开该任务的高级属性”,单击"完成",最后右击"定时关机"来打开属性,在运行栏输入“C:WINNTsystem32shutdown.exe -r -t 1”,单击"确定"不久,OK了。
4.结论:WindowsXP中的shutdown命令功能很强大,你可以去尝试使用,挖掘出功能,为我们服务。
DOS系统下SHUTDOWN。EXE 命令 SHUTDOWN S (关机) SHUTDOWN R(重启)
Last edited by shanliang8008 on 2007-8-16 at 08:41 PM ]
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 ]
|