Last active
April 16, 2022 18:09
-
-
Save Ambratolm/b3b7bf8571e08932446500ecbae666a2 to your computer and use it in GitHub Desktop.
Check if a Windows service exists, Enable it, and Start it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Check if service exists | |
sc query serviceName | |
REM Enable service to run automatically | |
sc config serviceName start= auto | |
REM Start service | |
net start serviceName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment