Jump to content
Sign in to follow this  
wazer

restarting service/app.

Recommended Posts

wazer

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")

Share this post


Link to post
Share on other sites
wakillon

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.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites
wakillon

May be a ControlSend would be more simple !

ControlSend ( "Program Manager", "", "", "{F5}" )

try and see Posted Image

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.