-
Notifications
You must be signed in to change notification settings - Fork 0
/
GoXLR.ps1
26 lines (22 loc) · 1.28 KB
/
GoXLR.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
$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
# Vérification de l'installation de Chocolatey
if (-not (Get-Command choco -ErrorAction SilentlyContinue)) {
Write-Host "Chocolatey is not installed. Loading installation..."
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
}
choco install goxlr-driver -y --no-progress --force
winget install -e --id "GoXLR-on-Linux.GoXLR-Utility" --accept-package-agreements --accept-source-agreements --disable-interactivity --force -h