Aron77 Posted May 3, 2017 Share Posted May 3, 2017 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 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 3, 2017 Moderators Share Posted May 3, 2017 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 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
spudw2k Posted May 4, 2017 Share Posted May 4, 2017 (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 May 4, 2017 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF 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