-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.ps1
More file actions
49 lines (41 loc) · 1.96 KB
/
install.ps1
File metadata and controls
49 lines (41 loc) · 1.96 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
# FREGONATOR Quick Installer v6.0
# Usage: irm fregonator.com/install.ps1 | iex
$ErrorActionPreference = 'Stop'
$version = '6.0'
$downloadUrl = 'https://github.com/dthcst/fregonator/releases/download/v6.0/FREGONATOR-6.0-Setup.zip'
$installPath = "$env:LOCALAPPDATA\FREGONATOR"
Write-Host ''
Write-Host ' FREGONATOR Quick Installer v6.0' -ForegroundColor Cyan
Write-Host ' https://fregonator.com' -ForegroundColor Gray
Write-Host ''
try {
Write-Host ' [1/3] Downloading...' -ForegroundColor Yellow
$tempZip = "$env:TEMP\fregonator-install.zip"
Invoke-WebRequest -Uri $downloadUrl -OutFile $tempZip -UseBasicParsing
Write-Host ' OK' -ForegroundColor Green
Write-Host ' [2/3] Installing...' -ForegroundColor Yellow
if (Test-Path $installPath) { Remove-Item $installPath -Recurse -Force }
New-Item -ItemType Directory -Path $installPath -Force | Out-Null
Expand-Archive -Path $tempZip -DestinationPath $installPath -Force
Write-Host ' OK' -ForegroundColor Green
Write-Host ' [3/3] Creating shortcut...' -ForegroundColor Yellow
$WshShell = New-Object -ComObject WScript.Shell
$shortcut = $WshShell.CreateShortcut("$env:USERPROFILE\Desktop\FREGONATOR.lnk")
$shortcut.TargetPath = "$installPath\FREGONATOR.bat"
$shortcut.WorkingDirectory = $installPath
$shortcut.IconLocation = "$installPath\fregonator.ico"
$shortcut.Save()
Write-Host ' OK' -ForegroundColor Green
Remove-Item $tempZip -Force -ErrorAction SilentlyContinue
Write-Host ''
Write-Host ' FREGONATOR installed!' -ForegroundColor Green
Write-Host " Location: $installPath" -ForegroundColor Gray
Write-Host ''
Write-Host ' Launching...' -ForegroundColor Cyan
Start-Sleep -Seconds 1
Start-Process "$installPath\FREGONATOR.bat" -WorkingDirectory $installPath
} catch {
Write-Host ''
Write-Host " [ERROR] $_" -ForegroundColor Red
Write-Host ' Download manually: https://fregonator.com' -ForegroundColor Yellow
}