added installer
This commit is contained in:
parent
1d04e2a4e8
commit
ce741133d8
12 changed files with 2226 additions and 0 deletions
37
Installer/install.bat
Normal file
37
Installer/install.bat
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
@echo off
|
||||
REM GSP Windows Agent Installer
|
||||
REM This script checks for Administrator privileges and launches the PowerShell installer
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
REM Check for Administrator privileges
|
||||
net session >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo.
|
||||
echo ERROR: This installer must be run as Administrator.
|
||||
echo.
|
||||
echo Please:
|
||||
echo 1. Right-click this batch file
|
||||
echo 2. Select "Run as Administrator"
|
||||
echo 3. Click "Yes" when prompted
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Get the directory where this batch file is located
|
||||
set "SCRIPT_DIR=%~dp0"
|
||||
|
||||
REM Verify the PowerShell script exists
|
||||
if not exist "%SCRIPT_DIR%Install-GSP-WindowsAgent.ps1" (
|
||||
echo ERROR: Install-GSP-WindowsAgent.ps1 not found in %SCRIPT_DIR%
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Launch the PowerShell installer
|
||||
REM Use -NoProfile to skip profile scripts, -ExecutionPolicy Bypass to allow script execution
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& '%SCRIPT_DIR%Install-GSP-WindowsAgent.ps1'" %*
|
||||
|
||||
REM Exit with PowerShell's exit code
|
||||
exit /b %ERRORLEVEL%
|
||||
Loading…
Add table
Add a link
Reference in a new issue