https://www.autoitscript.com/autoit3/docs/functions/Shutdown.htm

Shutdown(code),其中code為remarks的相加結果。

ex: 如果要強制關機,則remarks的值為1(關機)+4(強制)=5。

指令為:Shutdown(5)

--

 

Shutdown

 

Shuts down the system.

Shutdown ( code )

 

Parameters

code A combination of shutdown codes. See "remarks".

Return Value

Success: 1.
Failure: 0 and sets the @error flag to Windows API GetLastError().

Remarks

 

The shutdown code is a combination of the following values:
    $SD_LOGOFF (0) = Logoff
    $SD_SHUTDOWN (1) = Shutdown
    $SD_REBOOT (2) = Reboot
    $SD_FORCE (4) = Force
    $SD_POWERDOWN (8) = Power down
    $SD_FORCEHUNG (16) = Force if hung
    $SD_STANDBY (32) = Standby
    $SD_HIBERNATE (64) = Hibernate

Constants are defined in AutoItConstants.au3.

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 dizzy03 的頭像
    dizzy03

    碎碎念

    dizzy03 發表在 痞客邦 留言(0) 人氣()