action parameter query "ServiceName" with description "Please enter the service you would like to start:" With default "<Enter Service Name>"
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)) AND start type of it as lowercase contains "disabled")}
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 "{parameter "ServiceName" of action}"
delete netquiet.bat
action parameter query "ServiceName" with description "Please enter the service you would like to start:" With default "<Enter Service Name>"
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)) AND start type of it as lowercase contains "disabled")}
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 "{parameter "ServiceName" of action}"
delete netquiet.bat
action parameter query "ServiceName" with description "Please enter the service you would like to start:" With default "<Enter Service Name>"
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))) AND (start type of it as lowercase does not contain "disabled")}
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 "{parameter "ServiceName" of action}"
delete netquiet.bat
action parameter query "ServiceName" with description "Please enter the service you would like to start:" With default "<Enter Service Name>"
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))) AND (start type of 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)) as lowercase does not contain "disabled")}
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 "{parameter "ServiceName" of action}"
delete netquiet.bat
action parameter query "ServiceName" with description "Please enter the service you would like to start:" With default "<Enter Service Name>"
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)))}
continue if {(start type of 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)) as lowercase does not contain "disabled")}
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 "{parameter "ServiceName" of action}"
delete netquiet.bat
Always stick with super simple continue if relevance
Try this (I have not tested this so take a look!):
action parameter query "ServiceName" with description "Please enter the service you would like to start:" With default "<Enter Service Name>"
continue if {exists service (parameter "ServiceName" of action)}
continue if {start type of service (parameter "ServiceName" of action) = "disabled" or state of service (parameter "ServiceName" of action) != "Running"}
wait net start "{parameter "ServiceName" of action}"
wait sc config "{parameter "ServiceName" of action}" start= auto