Valnurat Posted August 1, 2016 Posted August 1, 2016 How is it possible to check the status of a service? I need to wait for a service to start before proceeding. Yours sincerely Kenneth.
SadBunny Posted August 1, 2016 Posted August 1, 2016 #include <array.au3> #include <service.au3> $aServices = _ServListInstalled() _ArrayDisplay($aServices) $spoolerStatus = _ServGetState("Spooler") MsgBox(64, "Spooler service status", $spoolerStatus) $appIDSvcStatus = _ServGetState("AppIDSvc") MsgBox(64, "AppIDSvc service status", $appIDSvcStatus) Do Sleep(1000) $myServiceStatus = _ServGetState("myServiceName") Until $myServiceStatus = "Running" MsgBox(64, "Yay!", "It's aliiiiiive!") Roses are FF0000, violets are 0000FF... All my base are belong to you.
water Posted August 1, 2016 Posted August 1, 2016 In the wiki you can find a list of available UDFs: https://www.autoitscript.com/wiki/User_Defined_Functions My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Valnurat Posted August 1, 2016 Author Posted August 1, 2016 1 hour ago, SadBunny said: #include <array.au3> #include <service.au3> $aServices = _ServListInstalled() _ArrayDisplay($aServices) $spoolerStatus = _ServGetState("Spooler") MsgBox(64, "Spooler service status", $spoolerStatus) $appIDSvcStatus = _ServGetState("AppIDSvc") MsgBox(64, "AppIDSvc service status", $appIDSvcStatus) Do Sleep(1000) $myServiceStatus = _ServGetState("myServiceName") Until $myServiceStatus = "Running" MsgBox(64, "Yay!", "It's aliiiiiive!") Where do I find the included service.au3? I get an error: Can't open include file <service.au3> Yours sincerely Kenneth.
SadBunny Posted August 1, 2016 Posted August 1, 2016 Oh, sorry, I've had that UDF for ages. Check Water's link. Roses are FF0000, violets are 0000FF... All my base are belong to you.
water Posted August 1, 2016 Posted August 1, 2016 Check my link above My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Valnurat Posted August 1, 2016 Author Posted August 1, 2016 The UDF by Engine? Yours sincerely Kenneth.
water Posted August 1, 2016 Posted August 1, 2016 (edited) Or: Service (by arcker) - Build your own service with AutoIt code.Windows Services (by engine) - Windows Services UDF. Edited August 1, 2016 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Valnurat Posted August 1, 2016 Author Posted August 1, 2016 Yes, I found them before, but they don't have the function calls in the exampel from SadBunny. Yours sincerely Kenneth.
jguinch Posted August 1, 2016 Posted August 1, 2016 Object way : Local $sServiceName = "RemoteRegistry" Local $oShell = ObjCreate("shell.application") Do Sleep(100) Until $oShell.IsServiceRunning($sServiceName) MsgBox(0, "", "Service " & $sServiceName & " is running now") LeoSS 1 Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
Valnurat Posted August 2, 2016 Author Posted August 2, 2016 @jguinch - It worked. Thank you. Yours sincerely Kenneth.
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