Цитата: выключить пк скриптом можно?
CODE:#define TRUE 1
#define FALSE 0
#define SE_SHUTDOWN_PRIVILEGE 0x13
#define EWX_FORCE 0x00000004
#define EWX_POWEROFF 0x00000008
#define SHTDN_REASON_FLAG_PLANNED 0x80000000
external(INT, "AdjustPrivilege" , "RtlAdjustPrivilege", "ntdll.dll");
external(INT, "ExitWindowsEx" , "ExitWindowsEx", "user32.dll");
int PreviousValue = 0;
AdjustPrivilege(SE_SHUTDOWN_PRIVILEGE, TRUE, FALSE, address(#PreviousValue));
ExitWindowsEx(EWX_POWEROFF | EWX_FORCE, SHTDN_REASON_FLAG_PLANNED); |