windows 如何强制重启而不是关机 (XP)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/74126/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 05:18:04  来源:igfitidea点击:

How to force a reboot instead of shutdown (XP)

windowsshutdownrestartreboot

提问by Alex Fort

I have a Windows XP SP2 virtual machine which can be accessed via VNC. It's also running Deep Freeze so there should be no problem in forcing it to reboot. I am looking for a way to force the operating system to reboot instead of shutting down or completely remove the ability to shut down the machine using software applications (such as the usual way from the start menu, the shutdown program or other custom programs).

我有一个可以通过 VNC 访问的 Windows XP SP2 虚拟机。它还运行 Deep Freeze,因此强制重启应该没有问题。我正在寻找一种方法来强制操作系统重新启动而不是关闭或完全删除使用软件应用程序关闭机器的能力(例如从开始菜单、关闭程序或其他自定义程序的常用方法)。

Thank you, Tom

谢谢你,汤姆

采纳答案by Toby Mills

To remove the ability to shut down then your best bet is to create a group policy for the user/user group and specify that they can only restart the system. I have done this in the past to ensure that only the administrator account can shut down a computer. it has prevented me from mistakenly shutting down a remote pc at 2am in the morning when i meant to re-start it.

要删除关闭功能,最好的办法是为用户/用户组创建一个组策略,并指定他们只能重新启动系统。我过去这样做是为了确保只有管理员帐户才能关闭计算机。它阻止了我在凌晨 2 点当我打算重新启动远程 PC 时错误地关闭它。

回答by Alex Fort

Try this:

尝试这个:

shutdown -r -t 1 -f

shutdown -r -t 1 -f

Alex

亚历克斯

回答by Toby Mills

In XP there is a DOS command called shutdown. If you type shutdown /?from a command prompt you will see the options available. Using this you can create a Batch file.

在 XP 中有一个 DOS 命令叫做 shutdown。如果shutdown /?从命令提示符键入,您将看到可用选项。使用它,您可以创建一个批处理文件。

回答by Burkhard

Try DShutdown.exe. It's flexible and can do all these things.

尝试 DShutdown.exe。它很灵活,可以做所有这些事情。