misrepresentative

more direct method to exit explorer gracefully?

4 posts in this topic

I recently found out that you could close Explorer gracefully. Steps (on my Win 7 system) : 1. Click on start menu button, 2. At "Shutdown" do Ctrl+Shift+ Right-click Mouse Button. There's  option to exit Explorer.

My question is if it's possible to trigger it in a more direct manner without : ControlClick, Send, Hotkeys, MouseClick.

 

Thank you.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Found out after some search. Hope it helps.

 

#include <SendMessage.au3>


    Local $hWnd = WinGetHandle ( "[CLASS:Shell_TrayWnd]" )
    Local $iMsg = 0x5B4

    _SendMessage ( $hWnd, $iMsg )

 

 

Edited by misrepresentative
variable name edit

Share this post


Link to post
Share on other sites

Thanks, jguinch. I'm not sure if that method does a graceful close. Triying to avoid ProcessClose as well.

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