-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.bat
More file actions
52 lines (45 loc) Β· 2.03 KB
/
install.bat
File metadata and controls
52 lines (45 loc) Β· 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@echo off
:: ============================================================================
:: OpenRappter One-Click Installer for Windows
:: Double-click this file or run from Command Prompt to install OpenRappter.
:: Tries pwsh (PowerShell 7+) first, falls back to powershell (5.1).
:: ============================================================================
title OpenRappter Installer
:: Determine script directory
set "SCRIPT_DIR=%~dp0"
:: ββ Try PowerShell 7+ (pwsh) first βββββββββββββββββββββββββββββββββββββββββ
where pwsh >nul 2>&1
if %errorlevel% equ 0 (
if exist "%SCRIPT_DIR%install.ps1" (
echo Starting OpenRappter installer [pwsh - local]...
pwsh -ExecutionPolicy Bypass -NoProfile -File "%SCRIPT_DIR%install.ps1" %*
goto :done
)
echo Downloading OpenRappter installer [pwsh]...
pwsh -ExecutionPolicy Bypass -NoProfile -Command "iex (irm 'https://kody-w.github.io/openrappter/install.ps1')"
goto :done
)
:: ββ Fall back to Windows PowerShell 5.1 βββββββββββββββββββββββββββββββββββββ
where powershell >nul 2>&1
if %errorlevel% neq 0 (
echo [ERROR] PowerShell is required but not found.
echo Please install PowerShell from https://aka.ms/PSWindows and try again.
pause
exit /b 1
)
if exist "%SCRIPT_DIR%install.ps1" (
echo Starting OpenRappter installer [powershell - local]...
powershell -ExecutionPolicy Bypass -NoProfile -File "%SCRIPT_DIR%install.ps1" %*
goto :done
)
echo Downloading OpenRappter installer [powershell]...
powershell -ExecutionPolicy Bypass -NoProfile -Command "iex (irm 'https://kody-w.github.io/openrappter/install.ps1')"
:done
if %errorlevel% neq 0 (
echo.
echo Installation encountered an error. See above for details.
echo If you see "Access is denied", open PowerShell directly and run:
echo irm https://kody-w.github.io/openrappter/install.ps1 ^| iex
echo.
)
pause