我使用shutdown.exe
的呼叫重新启动安装了不同版本Windows的计算机。带有破折号或斜杠的shutdown.exe参数?
对于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]
....
不是编程相关的?属于超级用户? – 2010-02-23 09:49:17
我从另一个程序调用命令,所以我想我不妨在这里发布它。 – Bertolt 2010-02-23 10:05:19
您应该使用记录的API,'InitiateSystemShutdownEx()' – MSalters 2010-02-23 10:07:28