-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.ps1
More file actions
34 lines (26 loc) · 1.03 KB
/
install.ps1
File metadata and controls
34 lines (26 loc) · 1.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
# DoScript Quick Installer
# Run with:
# irm https://raw.githubusercontent.com/TheServer-lab/DoScript/main/install.ps1 | iex
$ErrorActionPreference = "Stop"
$url = "https://github.com/TheServer-lab/DoScript/releases/download/latest-release/DoScriptSetup.exe"
$tempFile = Join-Path $env:TEMP "DoScriptSetup.exe"
try {
Write-Host "Downloading DoScript..." -ForegroundColor Cyan
Invoke-WebRequest -Uri $url -OutFile $tempFile
Write-Host "Launching installer..." -ForegroundColor Yellow
# Wait for installer to close
$proc = Start-Process -FilePath $tempFile -PassThru -Wait
Write-Host "Cleaning up..." -ForegroundColor Yellow
}
catch {
Write-Host "Installation failed or was cancelled." -ForegroundColor Red
}
finally {
Start-Sleep -Seconds 1
if (Test-Path $tempFile) {
Remove-Item $tempFile -Force -ErrorAction SilentlyContinue
}
}
Write-Host ""
Write-Host "Installer closed." -ForegroundColor Green
Write-Host "If DoScript was installed, reopen your terminal and run: do" -ForegroundColor DarkYellow