start services script

Few months back, i’ve created a script for start service fixlet to start spesific service. However it’s no longer working as it used to be and i required to login to each server to start the service again. Is there anything i need to remove/add into my scripting to make it work again. Here is my script. Kindly share with me where i should improve on scripting.

------------------script start---------------------------

//action parameter query “ServiceName” with description “Please enter the service you would like to start:” With default “”

//continue if {exists service whose (service name of it as lowercase = (parameter “ServiceName” of action as lowercase) OR (display name of it as lowercase = (parameter “ServiceName” of action as lowercase)))}

delete __appendfile
delete netquiet.bat

appendfile @ECHO OFF
appendfile start “” /min /b net %1 %2 /y > NUL 2> NUL
move __appendfile netquiet.bat

waithidden “{pathname of client folder of site “BESSupport” & “\RunQuiet.exe”}” netquiet.bat start “wuauserv”

delete netquiet.bat

You seem to be querying the operator for the name of a service to start - but then you aren’t using that parameter, you’re always starting “wuauserv” service.

You also shouldn’t be using “RunQuiet.exe” from the BES Support Site. That’s from a really old version of BigFix, is no longer required, and may have been removed with the BES Support utilities cleanup announced … A month or two ago?

In fact just make the whole action a single command after the query for parameter -

waithidden.exe net start "{parameter "ServiceName"}"
1 Like

In fact, yes, Runquiet.exe was removed from BES Support. Announcement at Removal of obsolete files from BES Support

1 Like

so the command shall be waithidden.exe net start “{parameter “wuauserv”}” right? let me try once