Add update_agent.cmd
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user