Add update_agent.cmd

This commit is contained in:
2025-01-19 15:43:51 +01:00
parent 3b730c162b
commit 281b3ce27d
3 changed files with 53 additions and 15 deletions

View File

@@ -1,5 +1,19 @@
@echo off
cd /D "%~dp0"
echo This script installs the Beszel agent for Windows.
echo If not yet installed, NSSM will be installed via Winget.
echo.
echo Checking adminstrative rights
rem from https://stackoverflow.com/questions/7985755/how-to-detect-if-cmd-is-running-as-administrator-has-elevated-privileges
net session >nul 2>&1
if %errorlevel% equ 0 (
echo Administrative rights check OK
) else (
echo You are NOT Administrator. Start the script from an administrative cmd.exe shell...
goto end
)
if !%1==! goto help
if !%2==! goto help