Skip to content

Instantly share code, notes, and snippets.

@arag0re
Last active March 10, 2022 22:48
Show Gist options
  • Save arag0re/aca0f726079945c500d5810bdb5075da to your computer and use it in GitHub Desktop.
Save arag0re/aca0f726079945c500d5810bdb5075da to your computer and use it in GitHub Desktop.
Standart Install with Chocolatey
## You need to start Powershell as Admin for this!!!
### WARNING: First you have to set the execution policy for powershell scripts on this system to "Set-ExecutionPolicy unrestricted"
### after executing this script change it back to "Set-ExecutionPolicy allSigned" (may have to restart powershell for this)
$Packages = 'googlechrome',
"firefox",
"notepadplusplus",
"7zip",
"openjdk8",
"openjdk11",
"office-tool",
"choco-cleaner"
If(Test-Path -Path "$env:ProgramData\Chocolatey") {
# DoYourPackageInstallStuff
ForEach ($PackageName in $Packages)
{
choco install $PackageName -y
}
}
Else {
# InstallChoco
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'))
# DoYourPackageInstallStuff
ForEach ($PackageName in $Packages)
{
choco install $PackageName -y
}
}
choco-cleaner
@arag0re
Copy link
Author

arag0re commented Mar 10, 2022

<3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment