Files
winauthmon-agent/build.bat
2025-05-25 20:42:59 +01:00

30 lines
735 B
Batchfile

@echo off
echo Building User Session Monitor Agent...
REM Check if Go is installed
where go >nul 2>nul
if %errorlevel% neq 0 (
echo Error: Go is not installed or not in PATH.
echo Please install Go from https://golang.org/dl/
exit /b 1
)
REM Install dependencies
echo Installing dependencies...
go get github.com/kardianos/service
go get golang.org/x/sys/windows
go get gopkg.in/ini.v1
REM Build the application
echo Building application...
go build -o winagentUSM.exe
if %errorlevel% neq 0 (
echo Build failed.
exit /b 1
)
echo Build successful. Output: winagentUSM.exe
echo.
echo To install as a service, run: winagentUSM.exe --service install
echo To see all available commands, run: winagentUSM.exe --help