Skip to content

Instantly share code, notes, and snippets.

@Stef16Robbe
Last active May 19, 2023 13:43
Show Gist options
  • Save Stef16Robbe/c509180d42f8123d3590d7710d0e7fe8 to your computer and use it in GitHub Desktop.
Save Stef16Robbe/c509180d42f8123d3590d7710d0e7fe8 to your computer and use it in GitHub Desktop.
auto downloader for common software i always dl on new Windows installs
# PRE REQS:
# Install-Module -Name ThreadJob
# Set-ExecutionPolicy RemoteSigned
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
if (!$currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Host "Execute me in an elevated shell!"
Exit
}
$uname = "Stef"
$folder = "C:\Users\$uname\Downloads\autodl\"
try {
New-Item -Path "C:\Users\$uname\Downloads" -Name "autodl" -ItemType "directory"
}
catch {
Write-Host "autodl folder already exists..."
}
$links = @(
@{
Uri = "https://www.dropbox.com/download"
OutFile = "${folder}dropbox.exe"
}
@{
Uri = "https://discord.com/api/downloads/distributions/app/installers/latest?channel=stable&platform=win&arch=x86"
OutFile = "${folder}discord.exe"
}
@{
Uri = "https://github.com/keepassxreboot/keepassxc/releases/download/2.7.5/KeePassXC-2.7.5-Win64.msi"
OutFile = "${folder}keepassxc.msi"
}
@{
Uri = "https://uk.download.nvidia.com/GFE/GFEClient/3.27.0.112/GeForce_Experience_v3.27.0.112.exe"
OutFile = "${folder}geforce-experience.exe"
}
@{
Uri = "https://rzr.to/synapse-3-pc-download"
OutFile = "${folder}razer-synapse.exe"
}
@{
Uri = "https://download01.logi.com/web/ftp/pub/techsupport/gaming/lghub_installer.exe"
OutFile = "${folder}lghub.exe"
}
@{
Uri = "https://code.visualstudio.com/sha/download?build=stable&os=win32-x64-user"
OutFile = "${folder}vscode.exe"
}
@{
Uri = "https://download.scdn.co/SpotifySetup.exe"
OutFile = "${folder}spotify.exe"
}
@{
Uri = "https://discord.com/api/downloads/distributions/app/installers/latest?channel=stable&platform=win&arch=x86"
OutFile = "${folder}discord.exe"
}
@{
Uri = "https://github.com/stefansundin/superf4/releases/download/v1.4/SuperF4-1.4.exe"
OutFile = "${folder}superf4.exe"
}
@{
Uri = "https://www.7-zip.org/a/7z2201-x64.exe"
OutFile = "${folder}7zip.exe"
}
@{
Uri = "https://cdn.akamai.steamstatic.com/client/installer/SteamSetup.exe"
OutFile = "${folder}steam.exe"
}
@{
Uri = "https://ubi.li/4vxt9"
OutFile = "${folder}ubisoftconnect.exe"
}
@{
Uri = "https://videolan.nl.mirrors.airvpn.org/vlc/3.0.18/win64/vlc-3.0.18-win64.exe"
OutFile = "${folder}vlc.exe"
}
@{
Uri = "https://go.microsoft.com/fwlink/?linkid=2187327&clcid=0x409&culture=en-us&country=us"
OutFile = "${folder}teams.exe"
}
@{
Uri = "https://downloads.sourceforge.net/project/dualmonitortool/dualmonitortool/2.9/DualMonitorTools-2.9.msi?ts=gAAAAABkZ3akzjFgatpRhW_MYXTUgre20nKPcy4gNTi39Xrr8V2_ekoj46YglOEJhphT3nISv2kgSI9c6akoYdu4UtK09ABlQA%3D%3D&r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fdualmonitortool%2Ffiles%2Flatest%2Fdownload"
OutFile = "${folder}dmt.msi"
}
)
$jobs = @()
foreach ($link in $links) {
$jobs += Start-ThreadJob -Name $link.OutFile -ScriptBlock {
$params = $using:link
Invoke-WebRequest @params
}
}
Write-Host "Downloads started..."
Wait-Job -Job $jobs
foreach ($job in $jobs) {
Receive-Job -Job $job
}
$downloads = Get-ChildItem $folder
foreach ($dl in $downloads) {
& ${folder}${dl}
}
Write-Host "`r`n==========`r`nDON'T FORGET:`r`nMOST ARE LINKS TO 'latest', SOME ARE DIRECT VERSIONS,`r`nYOU WILL HAVE TO UPDATE SOME`r`n`r`n
- INSTALL CHROME`r`n-INSTALL GIT`r`n- INSTALL VIBRANCEGUI`r`n- INSTALL ANY LANGS LIKE PYTHON, GO`r`n==========`r`n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment