Sign in to follow this  
Followers 0
Aron77

Check if Service on Remote Server is Stopped

3 posts in this topic

#1 ·  Posted

Hi,

I need you help with a script I'm writing. I need to stop a service on on of my servers (that part is working) and then need to make sure the script only continues once the service is stopped.

I would like to avoid SLEEP

I was trying something like this juts to get you an idea:

Do
    Sleep(100)
Until $oShell.ServiceStop(spooler)

Problem is, ServiceStop doesn't work that way and I have no idea how I would do this on a remote server.

Any idea or suggestion would be highly appreciated.

Thanks

Aron

 

Share this post


Link to post
Share on other sites



#2 ·  Posted

Moved to the correct forum, as the DEV forum very clearly states

Quote

Do not create AutoIt-related topics here, use the AutoIt General Help and Support

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

What COM object is $oShell using?  ...assuming shell.application

You could use the command-line exe SC to work with remote (or local) services.  Be sure that the account you are using has rights on the remote machine.

Edited by spudw2k

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  
Followers 0