-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstall-Packages.ps1
More file actions
57 lines (53 loc) · 2.3 KB
/
Install-Packages.ps1
File metadata and controls
57 lines (53 loc) · 2.3 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
53
54
55
56
57
$Principal = [Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()
$IsAdministrator = $Principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if ($IsAdministrator) {
Write-Error -Message "Do not run this script as a privileged user." -ErrorAction Stop
return
}
$PackagesList = @{
"9PJSDV0VPK04" = "Bitwarden"
"XP89DCGQ3K6VLD" = "PowerToys"
"XP9KHM4BK9FZ7Q" = "Visual Studio Code"
"9MZ1SNWT0N5D" = "PowerShell"
"9NN77TCQ1NC8" = "Mp3tag"
"9PKTQ5699M62" = "iCloud"
"9NP83LWLPZ9K" = "Apple Devices"
"9PFHDD62MXS1" = "Apple Music"
"XPDCFJDKLZJLP8" = "Visual Studio"
"XPDDT99J9GKB5C" = "Samsung Magician"
"GitHub.GitHubDesktop" = "GitHub Desktop"
"Git.Git" = "Git"
"JRSoftware.InnoSetup" = "Inno Setup"
"PPSSPPTeam.PPSSPP" = "PPSSPP"
"Valve.Steam" = "Steam"
"7zip.7zip" = "7-Zip"
"RevoUninstaller.RevoUninstaller" = "Revo Uninstaller"
"voidtools.Everything.Lite" = "Everything Lite"
"Neovim.Neovim" = "Neovim"
"ShareX.ShareX" = "ShareX"
"Corsair.iCUE.5" = "iCUE"
"Intel.IntelDriverAndSupportAssistant" = "Intel Driver & Support Assistant"
"Stenzek.DuckStation" = "DuckStation"
"PCSX2Team.PCSX2" = "PCSX2"
"Guru3D.Afterburner" = "MSI Afterburner"
"Google.GoogleDrive" = "Google Drive"
}
try {
$PackagesList.Keys | ForEach-Object {
$PackageId = $_
$PackageName = $PackagesList[$_]
Write-Host "Installing $PackageName..."
Start-Process -FilePath "winget.exe" -ArgumentList (
"install",
"--exact",
"--id",
$PackageId,
"--accept-source-agreements",
"--accept-package-agreements",
"--silent"
) -NoNewWindow -Wait
}
}
catch {
throw $_.Message
}