@echo off
:: ============================================================
:: Install Folder Watchtower as a Windows Service (portable)
:: Run this script as Administrator
:: ============================================================
echo.
echo Installing Folder Watchtower Service...
echo.

sc create FolderWatchtower binPath="%~dp0service\FolderWatchtower.Service.exe" start=auto DisplayName="Folder Watchtower Monitoring Service"
sc description FolderWatchtower "Folder Watchtower background monitoring service. Monitors folders even when no user is logged in."
sc failure FolderWatchtower reset=86400 actions=restart/60000/restart/60000//

echo.
echo Service installed. Starting...
sc start FolderWatchtower

echo.
echo Done! The service is now running.
pause
