Jump to content

restarting service/app.


wazer
 Share

Recommended Posts

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

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

Link to comment
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
 Share

  • Recently Browsing   0 members

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