Jump to content

Recommended Posts

Posted (edited)

Windows LogOnOff Screen

Seems to be an undocumented API call ?

#Include <WinAPI.au3>

WinLogOnOff()

Func WinLogOnOff()
Local $nCount
    $nCount = DllCall("shell32.dll", "int", 60, "hwnd", 0)
        Return $nCount[0]
EndFunc

ConsoleWrite( "DllCall Error " & _WinAPI_GetLastError () & @CRLF & _WinAPI_GetLastErrorMessage ()) ;Error 13: The data is invalid.

Just something I had laying around.

Regards

ptrex

Edited by ptrex
  • 4 weeks later...
  • 6 months later...
Posted

Doing a bit of grave digging here. :)

Is just tested these and they produce slightly different results. The computer I tried these on has a pending Windows Update. Using the function from ptrex displays the "Shut Down Windows" windows with the "Install updates and shut down" option pre-selectd, while the line from TokGajah doesn't even have that option.

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...