我使用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