shutdown.exe 参数带有破折号或斜杠?
我使用 shutdown.exe
调用来重新启动安装了不同版本 Windows 的计算机。
对于 Windows XP,命令是:
shutdown.exe -r -f -t 01
对于我使用的其他版本的 Windows:
shutdown.exe /L /R /C /Y /T:1
现在看来,第二个命令在 Windows XP 上不起作用。有谁知道哪些版本的 Windows 支持斜杠和破折号?
编辑:
这不是参数错误的问题。以下是受影响计算机(德国安装的 Windows XP)的打印输出:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\shutdown.exe /L /R /C /Y /T:1
Syntax: shutdown.exe [-l | -s | -r | -a] [-f] [-m \\Computer] [-t xx]
[-c "Kommentar"] [-d up:xx:yy]
....
I use a call of shutdown.exe
to reboot machines having different versions of Windows installed.
For Windows XP the command is:
shutdown.exe -r -f -t 01
For other versions of Windows I use:
shutdown.exe /L /R /C /Y /T:1
Now it seems, that the second command won't work on Windows XP. Does anybody know which versions of Windows support slashes and which dashes?
EDIT:
This is not an issue of wrong parameters. Here is a printout from an affected machine (German installation of Windows XP):
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\shutdown.exe /L /R /C /Y /T:1
Syntax: shutdown.exe [-l | -s | -r | -a] [-f] [-m \\Computer] [-t xx]
[-c "Kommentar"] [-d up:xx:yy]
....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
斜杠在 XP 上确实有效,但正如 Poke 所说,您需要使用小写字母。此外,您似乎不能将“/l”与“/r”一起使用(这是有道理的,因为计算机的关闭和重新启动无论如何都会注销用户),并且您不应该在“/t”之后使用冒号“
例如:
Slashes do work on XP, but as Poke said you need to use lower-case. Additionally, it appears that you can't use "/l" with "/r" (which makes sense since a shutdown and restart of the computer will log users off anyway), and you shouldn't use a colon after "/t"
Eg:
使用
shutdown.exe /?
了解参数的使用方式以及哪些参数可用。查看帮助文本(在 Win7 atm 上),似乎您需要将这些字符小写,以便它们正常工作。Use
shutdown.exe /?
to find out how parameters are used, and which parameters are available. Looking at the help text (on Win7 atm), it seems that you need to lower-case those characters so they work correctly.我通常在 winXP 等上使用破折号...
i usually use dashes... on winXP and thereon...