wazer Posted September 4, 2010 Share Posted September 4, 2010 Hello im making a new quick launch classic look and feel for windows 7. I have to make some changes to the taskbar, however before the user see the changes. The computer needs to be restarted or explorer restarted. like this script does, however the script does not work good. Sometimes it restart explorer, sometimes it does not. And some times it start explorer twice resulting in opening the libarian folder. So im asking for a better method that can be more safe for users that open this program. ;End Windows Explorer. While ProcessExists ( "explorer.exe" ) ProcessClose ( "explorer.exe" ) WEnd sleep(3000) ;Restart Windows Explorer. Run("explorer.exe") If NOT ProcessExists("explorer.exe") Then Run("explorer.exe") Link to comment Share on other sites More sharing options...
wakillon Posted September 4, 2010 Share Posted September 4, 2010 There is some years I needed to restart my explorer who often crashed and I used this While ProcessExists ( "explorer.exe" ) ProcessClose ( "explorer.exe" ) WEnd Sleep ( 4000 ) While Not ProcessExists ( "explorer.exe" ) Run ( @WindowsDir & "\explorer.exe" ) Sleep ( 1000 ) WEnd Exit AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
wazer Posted September 5, 2010 Author Share Posted September 5, 2010 There is some years I needed to restart my explorer who often crashed and I used this While ProcessExists ( "explorer.exe" ) ProcessClose ( "explorer.exe" ) WEnd Sleep ( 4000 ) While Not ProcessExists ( "explorer.exe" ) Run ( @WindowsDir & "\explorer.exe" ) Sleep ( 1000 ) WEnd Exit Thanks man that worked well Link to comment Share on other sites More sharing options...
wakillon Posted September 5, 2010 Share Posted September 5, 2010 (edited) May be a ControlSend would be more simple ! ControlSend ( "Program Manager", "", "", "{F5}" ) try and see Edited September 5, 2010 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now