-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEquicord.ps1
37 lines (24 loc) · 1.04 KB
/
Equicord.ps1
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
$host.ui.RawUI.BackgroundColor = "Black"
$host.ui.RawUI.ForegroundColor = "White"
Clear-Host
# Vérifier les privilèges administratifs
function Check-Admin {
Write-Host "Checking for Administrative Privileges..."
Start-Sleep -Seconds 3
$currentUser = [Security.Principal.WindowsIdentity]::GetCurrent()
$principal = New-Object Security.Principal.WindowsPrincipal($currentUser)
if (-not $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Start-Process powershell -Verb runAs -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`""
exit
}
}
Check-Admin
$DOWNLOAD_GUI = "https://github.com/Equicord/Equilotl/releases/latest/download/Equilotl.exe"
$link = $DOWNLOAD_GUI
$outfile = "$env:TEMP\$(([uri]$link).Segments[-1])"
Write-Output "Downloading installer to $outfile"
Invoke-WebRequest -Uri "$link" -OutFile "$outfile"
Write-Output ""
Start-Process -Wait -NoNewWindow -FilePath "$outfile"
# Cleanup
Remove-Item -Force "$outfile"