Hi.
I am trying to shut down my comp. (or turn off power) with if but I fail. Log off does work, to bad Power off doesn't . So can anyone help me with this problem?
Off Topic: Sorry for the first post but why can't I post on a old thread?Code:This DOES work: if ( Attempts <= 1 ){ ExitWindowsEx(EWX_LOGOFF,0); } This DOESN'T work: if ( Attempts <= 1 ){ ExitWindowsEx(EWX_POWEROFF,0); }