Windows Services
Creating a Service from a normal application
Creating a Service from a normal application
https://ethertubes.com/make-a-program-run-as-a-windows-service-on-boot/
ethertubes.com-Make a Program Run as a Windows Service on Boot.pdf
Stopping Services with a command line
Stopping Services with a command line
https://stackoverflow.com/questions/2874911/halt-batch-file-until-service-stop-is-complete
@ECHO OFF
:check_Permissions
echo Administrative permissions required. Detecting permissions...
cacls "%systemroot%\system32\config\system" 1>nul 2>&1
if %errorLevel% == 0 (
echo Success: Administrative rights OK!
) else (
echo Failure: Current permissions inadequate.
echo.
echo To run this batch file right-click and select
echo "Run as administrator".
echo.
pause
exit /b 1
)
:MENU
CLS
sc stop webdriveservice
:loop
sc query webdriveservice | find "STOPPED"
if errorlevel 1 (
timeout 1
goto loop
)