Last active
September 21, 2020 09:00
-
-
Save bigyank/0fa9f75d57c6e8ea453ac45b847799c7 to your computer and use it in GitHub Desktop.
script to get essential programs after fresh windows install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit } | |
echo "starting" | |
$Packages = 'vscode', | |
'git', | |
'vscode-settingssync', | |
'7zip', | |
'anki', | |
'notepadplusplus', | |
'qbittorrent', | |
'potplayer', | |
'youtube-dl', | |
'ffmpeg', | |
'nodejs-lts', | |
'hackfont', | |
'sumatrapdf', | |
'discord', | |
'spotify', | |
'jdownloader', | |
'hyper' | |
function installPac { | |
ForEach ($PackageName in $Packages) | |
{ | |
choco install $PackageName -y | |
} | |
} | |
If(Test-Path -Path "$env:ProgramData\Chocolatey") { | |
installPac | |
} | |
Else { | |
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
installPac | |
} | |
echo "sucessful" | |
Read-Host -Prompt "Press Enter to exit" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment