ptrex

Windows LogOnOff Screen

6 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



Hi ptrex

Thanks for sharing

works indeed

don't know when i could could/should use it

Best regards,

Emiel


Best regards,Emiel Wieldraaijer

Share this post


Link to post
Share on other sites

Hi, i found more simple way

WinClose("[CLASS:Progman]", "")

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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