Skip to content

Instantly share code, notes, and snippets.

@mikepruett3
Last active October 7, 2025 10:21
Show Gist options
  • Save mikepruett3/7ca6518051383ee14f9cf8ae63ba18a7 to your computer and use it in GitHub Desktop.
Save mikepruett3/7ca6518051383ee14f9cf8ae63ba18a7 to your computer and use it in GitHub Desktop.

Revisions

  1. mikepruett3 revised this gist Aug 4, 2023. 1 changed file with 61 additions and 29 deletions.
    90 changes: 61 additions & 29 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@
    Author: Mike Pruett
    Date: October 18th, 2018
    Last Updated on December 26th, 2022
    Last Updated on August 4th, 2023
    #>

    $VerbosePreference = "Continue"
    @@ -253,6 +253,7 @@ Register-ScheduledTask -TaskName "Aria2RPC" -Action $Action -Trigger $Trigger -P

    ## Add Buckets
    Enable-Bucket -Bucket "extras"
    Enable-Bucket -Bucket "nerd-fonts"
    Enable-Bucket -Bucket "java"
    Enable-Bucket -Bucket "nirsoft"
    scoop bucket add foosel https://github.com/foosel/scoop-bucket
    @@ -290,26 +291,26 @@ if ($HomeWorkstation) {
    $Scoop = @(
    "scoop-tray",
    "concfg",
    "curl",
    "busybox",
    "fzf",
    "neovim",
    #"curl",
    #"busybox",
    #"fzf",
    #"neovim",
    "pshazz",
    "cacert",
    "colortool",
    "sudo",
    #"sudo",
    #"openjdk",
    "icedtea-web",
    #"go",
    "python",
    "gpg",
    "imgburn",
    "paint.net",
    #"python",
    #"gpg",
    #"imgburn",
    #"paint.net",
    #"putty",
    #"winscp",
    "spacesniffer",
    #"spacesniffer",
    #"filebot",
    "rufus",
    #"rufus",
    #"etcher",
    #"cpu-z",
    #"gpu-z",
    @@ -320,12 +321,13 @@ $Scoop = @(
    "open-log-viewer",
    "baretail",
    #"bleachbit",
    "hosts-file-editor",
    #"hosts-file-editor",
    "minio-client",
    "lessmsi",
    "mqtt-explorer",
    #"mqtt-explorer",
    "tftpd",
    "restic",
    "Hack-NF",
    "driverstoreexplorer",
    "sysinternals")#,"rktools2k3")
    foreach ($item in $Scoop) {
    @@ -340,14 +342,14 @@ if ($HomeWorkstation) {
    "mpv",
    #"vlc",
    "lame",
    "musicbee",
    #"musicbee",
    #"mp3tag",
    #"mkvtoolnix",
    "obs-studio",
    "yt-dlp",
    #"obs-studio",
    #"yt-dlp",
    #"ocenaudio",
    "mediainfo",
    "mediainfo-gui",
    #"mediainfo",
    #"mediainfo-gui",
    "cdrtools",
    "cuetools",
    "betterjoy",
    @@ -360,23 +362,40 @@ if ($HomeWorkstation) {
    # Install WinGet Packages
    $WinGet = @(
    #"Microsoft.dotNetFramework",
    "gerardog.gsudo",
    "Microsoft.DotNet.DesktopRuntime.3_1",
    "Microsoft.DotNet.DesktopRuntime.5",
    "Microsoft.DotNet.DesktopRuntime.6",
    "Microsoft.DotNet.DesktopRuntime.7",
    "Microsoft.WindowsTerminal",
    "Microsoft.PowerToys",
    "frippery.busybox-w32",
    "junegunn.fzf",
    "Neovim.Neovim",
    "Obsidian.Obsidian",
    "Microsoft.OpenJDK.17",
    "GoLang.Go.1.19",
    "Python.Python.3.11",
    "chrisant996.Clink",
    "PuTTY.PuTTY",
    "WinSCP.WinSCP",
    "Balena.Etcher",
    "CPUID.HWMonitor",
    "CrystalDewWorld.CrystalDiskMark",
    "BleachBit.BleachBit",
    "TeamViewer.TeamViewer",
    #"TeamViewer.TeamViewer",
    "GnuPG.GnuPG",
    "LIGHTNINGUK.ImgBurn",
    "dotPDNLLC.paintdotnet",
    "UderzoSoftware.SpaceSniffer",
    "Rufus.Rufus",
    "scottlerch.hosts-file-editor",
    #"Minio.Client",
    "thomasnordquist.MQTT-Explorer",
    "jziolkowski.tdm",
    "HDDGURU.HDDRawCopyTool",
    "dnSpyEx.dnSpy",
    "JLC.EasyEDA",
    "Google.Chrome",
    "Lexikos.AutoHotkey",
    "SumatraPDF.SumatraPDF",
    @@ -387,7 +406,8 @@ $WinGet = @(
    "RARLab.WinRAR",
    "Piriform.Speccy",
    "Piriform.Defraggler",
    "Starship.Starship"
    "Starship.Starship",
    "OliverBetz.ExifTool"
    )
    foreach ($item in $WinGet) {
    Install-WinGetApp -PackageID "$item"
    @@ -411,6 +431,11 @@ if ($HomeWorkstation) {
    "TechPowerUp.GPU-Z",
    "VideoLAN.VLC",
    "Mp3tag.Mp3tag",
    "MusicBee.MusicBee",
    "OBSProject.OBSStudio",
    "yt-dlp.yt-dlp",
    "MediaArea.MediaInfo",
    "MediaArea.MediaInfo.GUI",
    "MoritzBunkus.MKVToolNix",
    "Ocenaudio.Ocenaudio",
    "OpenMPT.OpenMPT",
    @@ -462,19 +487,26 @@ if ($HomeWorkstation) {
    }
    }

    # Create Symbolic Links
    ## busybox.exe
    sudo New-Item -ItemType SymbolicLink -Path "$(Split-Path -Path (Get-Command busybox*.exe).Source)\busybox.exe" -Target (Get-Command busybox*.exe).Source
    ## tdmgr.exe
    sudo New-Item -ItemType SymbolicLink -Path "$(Split-Path -Path (Get-Command tdmgr*.exe).Source)\tdmgr.exe" -Target (Get-Command tdmgr*.exe).Source


    # Install Custom Packages
    # Instal RawWrite for Windows from Chrysocome
    Install-CustomApp -URL "http://www.chrysocome.net/downloads/0d23e6a31f1d37850fc2040eec98e9f9/rawwritewin-0.7.zip" -Folder "RawWrite"
    # Install Tasmota Device Manager from Github
    New-Item -Path "$Env:UserProfile\bin\TasmotaDM" -ItemType Directory | Out-Null
    Download-CustomApp -Link "https://github.com/jziolkowski/tdm/releases/download/v0.2.11/tdmgr_0.2.11.exe" -Folder "$Env:UserProfile\bin\TasmotaDM" | Out-Null
    #New-Item -Path "$Env:UserProfile\bin\TasmotaDM" -ItemType Directory | Out-Null
    #Download-CustomApp -Link "https://github.com/jziolkowski/tdm/releases/download/v0.2.11/tdmgr_0.2.11.exe" -Folder "$Env:UserProfile\bin\TasmotaDM" | Out-Null
    # Install HDD Raw Copy Tool from HDDGURU
    New-Item -Path "$Env:UserProfile\bin\HDDRawCopy" -ItemType Directory | Out-Null
    Download-CustomApp -Link "https://hddguru.com/software/HDD-Raw-Copy-Tool/HDDRawCopy1.10Portable.exe" -Folder "$Env:UserProfile\bin\HDDRawCopy" | Out-Null
    #New-Item -Path "$Env:UserProfile\bin\HDDRawCopy" -ItemType Directory | Out-Null
    #Download-CustomApp -Link "https://hddguru.com/software/HDD-Raw-Copy-Tool/HDDRawCopy1.10Portable.exe" -Folder "$Env:UserProfile\bin\HDDRawCopy" | Out-Null
    # Install XVI32 from Christian Maas
    Install-CustomApp -URL "http://www.handshake.de/user/chmaas/delphi/download/xvi32.zip" -Folder "XVI32"
    # Install dnSpy from Github
    Install-CustomApp -URL "https://github.com/dnSpy/dnSpy/releases/download/v6.1.8/dnSpy-net-win64.zip" -Folder "dnSpy"
    #Install-CustomApp -URL "https://github.com/dnSpy/dnSpy/releases/download/v6.1.8/dnSpy-net-win64.zip" -Folder "dnSpy"
    # Install ei.cfg Removal Utility from code.kliu.org
    Install-CustomApp -URL "https://code.kliu.org/misc/winisoutils/eicfg_removal_utility.zip" -Folder "ei.cfg-removal-utility"
    # Install HSFExplorer from SourceForge
    @@ -525,8 +557,8 @@ if ($HomeWorkstation) {
    7z e -o"$Env:UserProfile\bin\" -y "$Env:UserProfile\Downloads\$Package" chdman.exe | Out-Null
    Remove-Item -Path "$Env:UserProfile\Downloads\$Package"
    # Install ExifTool from ExifTool.org
    Install-CustomApp -URL "https://www.exiftool.org/exiftool-12.41.zip"
    Move-Item -Path "$Env:UserProfile\bin\exiftool*.exe" -Destination "$Env:UserProfile\bin\exiftool.exe"
    #Install-CustomApp -URL "https://www.exiftool.org/exiftool-12.41.zip"
    #Move-Item -Path "$Env:UserProfile\bin\exiftool*.exe" -Destination "$Env:UserProfile\bin\exiftool.exe"
    # Install OpenMPT123 from OpenMPT
    Install-CustomApp -URL "https://lib.openmpt.org/files/libopenmpt/bin/libopenmpt-0.6.3+release.bin.windows.zip" -Folder "OpenMPT123"
    # Install WildMIDI from Github
    @@ -629,6 +661,6 @@ if (!$wslInstalled) {
    Write-Verbose -Message "Installing Windows SubSystems for Linux..."
    Start-Process -FilePath "PowerShell" -ArgumentList "wsl","--install" -Verb RunAs -Wait -WindowStyle Hidden
    }
    Install-WinGetApp -PackageID Canonical.Ubuntu.2004
    Install-WinGetApp -PackageID Canonical.Ubuntu.2204
    Write-Output "Install complete! Please reboot your machine/worksation!"
    Start-Sleep -Seconds 10
  2. mikepruett3 revised this gist Dec 27, 2022. 1 changed file with 10 additions and 9 deletions.
    19 changes: 10 additions & 9 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -212,8 +212,8 @@ if ((Get-WindowsCapability -Online -Name OpenSSH.Client*).State -ne "Installed")
    Add-WindowsCapability -Online -Name OpenSSH.Client*
    }
    '@ > "${Env:Temp}\openssh.ps1"
    Start-Process -FilePath "PowerShell" -ArgumentList "${Env:Temp}\openssh.ps1" -Verb RunAs -Wait -WindowStyle Hidden
    Remove-Item -Path "${Env:Temp}\openssh.ps1" -Force
    Start-Process -FilePath "PowerShell" -ArgumentList "${Env:Temp}\openssh.ps1" -Verb RunAs -Wait -WindowStyle Hidden
    Remove-Item -Path "${Env:Temp}\openssh.ps1" -Force

    # Configure git
    Install-WinGetApp -PackageID "Git.Git"
    @@ -309,7 +309,7 @@ $Scoop = @(
    #"winscp",
    "spacesniffer",
    #"filebot",
    #"rufus",
    "rufus",
    #"etcher",
    #"cpu-z",
    #"gpu-z",
    @@ -359,10 +359,11 @@ if ($HomeWorkstation) {

    # Install WinGet Packages
    $WinGet = @(
    "Microsoft.dotNetFramework",
    "Microsoft.dotnetRuntime.3-x64",
    "Microsoft.dotnetRuntime.5-x64",
    "Microsoft.dotnetRuntime.6-x64",
    #"Microsoft.dotNetFramework",
    "Microsoft.DotNet.DesktopRuntime.3_1",
    "Microsoft.DotNet.DesktopRuntime.5",
    "Microsoft.DotNet.DesktopRuntime.6",
    "Microsoft.DotNet.DesktopRuntime.7",
    "Microsoft.WindowsTerminal",
    "Microsoft.PowerToys",
    "Obsidian.Obsidian",
    @@ -371,7 +372,6 @@ $WinGet = @(
    "chrisant996.Clink",
    "PuTTY.PuTTY",
    "WinSCP.WinSCP",
    "Rufus.Rufus",
    "Balena.Etcher",
    "CPUID.HWMonitor",
    "CrystalDewWorld.CrystalDiskMark",
    @@ -386,7 +386,8 @@ $WinGet = @(
    "ElaborateBytes.VirtualCloneDrive",
    "RARLab.WinRAR",
    "Piriform.Speccy",
    "Piriform.Defraggler"
    "Piriform.Defraggler",
    "Starship.Starship"
    )
    foreach ($item in $WinGet) {
    Install-WinGetApp -PackageID "$item"
  3. mikepruett3 revised this gist Dec 27, 2022. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -207,16 +207,19 @@ if ([Environment]::OSVersion.Version.Major -lt 10) {
    }

    # Install OpenSSH.Client on Windows 10+
    if ((Get-WindowsCapability -Online -Name OpenSSH.Client*).State -ne "Installed") {
    @'
    Add-WindowsCapability -Online -Name OpenSSH.Client*
    if ((Get-WindowsCapability -Online -Name OpenSSH.Client*).State -ne "Installed") {
    Add-WindowsCapability -Online -Name OpenSSH.Client*
    }
    '@ > "${Env:Temp}\openssh.ps1"
    Start-Process -FilePath "PowerShell" -ArgumentList "${Env:Temp}\openssh.ps1" -Verb RunAs -Wait -WindowStyle Hidden
    Remove-Item -Path "${Env:Temp}\openssh.ps1" -Force
    }

    # Configure git
    Install-WinGetApp -PackageID "Git.Git"
    Start-Sleep -Seconds 5
    refreshenv
    Start-Sleep -Seconds 5
    if (!$(git config --global credential.helper) -eq "manager-core") {
    git config --global credential.helper manager-core
    }
  4. mikepruett3 revised this gist Dec 27, 2022. No changes.
  5. mikepruett3 revised this gist Dec 27, 2022. 1 changed file with 15 additions and 13 deletions.
    28 changes: 15 additions & 13 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -34,12 +34,14 @@ function Install-WinGetApp {
    Write-Verbose -Message "Preparing to install $PackageID"
    # Added accept options based on this issue - https://github.com/microsoft/winget-cli/issues/1559
    #$listApp = winget list --exact -q $PackageID --accept-source-agreements
    if (!(winget list --exact -q $PackageID --accept-source-agreements)) {
    Write-Verbose -Message "Installing $Package"
    winget install --silent --id $PackageID --accept-source-agreements --accept-package-agreements
    } else {
    Write-Verbose -Message "Package $PackageID already installed! Skipping..."
    }
    #if (winget list --exact --id "$PackageID" --accept-source-agreements) {
    # Write-Verbose -Message "Package $PackageID already installed! Skipping..."
    #} else {
    # Write-Verbose -Message "Installing $Package"
    # winget install --silent --id "$PackageID" --accept-source-agreements --accept-package-agreements
    #}
    Write-Verbose -Message "Installing $Package"
    winget install --silent --id "$PackageID" --accept-source-agreements --accept-package-agreements
    }

    function Install-ChocoApp {
    @@ -157,8 +159,6 @@ if ( !(Get-Command -Name "scoop" -CommandType Application -ErrorAction SilentlyC
    iex ((New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh'))
    }

    Read-Host -Prompt "Press any key to continue"

    # Install Chocolatey, if not already installed
    #$chocoInstalled = Get-Command -Name "choco" -CommandType Application -ErrorAction SilentlyContinue | Out-Null
    if (! (Get-Command -Name "choco" -CommandType Application -ErrorAction SilentlyContinue | Out-Null) ) {
    @@ -171,12 +171,10 @@ iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocola
    Remove-Item -Path $Env:Temp\choco.ps1 -Force
    }

    Read-Host -Prompt "Press any key to continue"

    # Install WinGet, if not already installed
    # From crutkas's gist - https://gist.github.com/crutkas/6c2096eae387e544bd05cde246f23901
    $hasPackageManager = Get-AppPackage -name "Microsoft.DesktopAppInstaller"
    if (!$hasPackageManager) {
    #$hasPackageManager = Get-AppPackage -name "Microsoft.DesktopAppInstaller"
    if (!(Get-AppPackage -name "Microsoft.DesktopAppInstaller")) {
    Write-Verbose -Message "Installing WinGet..."
    @'
    # Set URL and Enable TLSv12
    @@ -210,7 +208,11 @@ if ([Environment]::OSVersion.Version.Major -lt 10) {

    # Install OpenSSH.Client on Windows 10+
    if ((Get-WindowsCapability -Online -Name OpenSSH.Client*).State -ne "Installed") {
    Add-WindowsCapability -Online -Name OpenSSH.Client*
    @'
    Add-WindowsCapability -Online -Name OpenSSH.Client*
    '@ > "${Env:Temp}\openssh.ps1"
    Start-Process -FilePath "PowerShell" -ArgumentList "${Env:Temp}\openssh.ps1" -Verb RunAs -Wait -WindowStyle Hidden
    Remove-Item -Path "${Env:Temp}\openssh.ps1" -Force
    }

    # Configure git
  6. mikepruett3 revised this gist Dec 27, 2022. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -157,6 +157,8 @@ if ( !(Get-Command -Name "scoop" -CommandType Application -ErrorAction SilentlyC
    iex ((New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh'))
    }

    Read-Host -Prompt "Press any key to continue"

    # Install Chocolatey, if not already installed
    #$chocoInstalled = Get-Command -Name "choco" -CommandType Application -ErrorAction SilentlyContinue | Out-Null
    if (! (Get-Command -Name "choco" -CommandType Application -ErrorAction SilentlyContinue | Out-Null) ) {
    @@ -169,6 +171,8 @@ iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocola
    Remove-Item -Path $Env:Temp\choco.ps1 -Force
    }

    Read-Host -Prompt "Press any key to continue"

    # Install WinGet, if not already installed
    # From crutkas's gist - https://gist.github.com/crutkas/6c2096eae387e544bd05cde246f23901
    $hasPackageManager = Get-AppPackage -name "Microsoft.DesktopAppInstaller"
  7. mikepruett3 revised this gist Dec 27, 2022. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -33,8 +33,8 @@ function Install-WinGetApp {
    )
    Write-Verbose -Message "Preparing to install $PackageID"
    # Added accept options based on this issue - https://github.com/microsoft/winget-cli/issues/1559
    $listApp = winget list --exact -q $PackageID --accept-source-agreements
    if (!$listApp) {
    #$listApp = winget list --exact -q $PackageID --accept-source-agreements
    if (!(winget list --exact -q $PackageID --accept-source-agreements)) {
    Write-Verbose -Message "Installing $Package"
    winget install --silent --id $PackageID --accept-source-agreements --accept-package-agreements
    } else {
  8. mikepruett3 revised this gist Dec 27, 2022. 1 changed file with 59 additions and 26 deletions.
    85 changes: 59 additions & 26 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,8 @@
    Author: Mike Pruett
    Date: October 18th, 2018
    Last Updated on December 26th, 2022
    #>

    $VerbosePreference = "Continue"
    @@ -197,8 +199,18 @@ Add-AppxPackage -Path $latestRelease.browser_download_url
    Remove-Item -Path $Env:Temp\winget.ps1 -Force
    }

    # Only install OpenSSH Package, if not on Windows 10
    if ([Environment]::OSVersion.Version.Major -lt 10) {
    Install-ScoopApp -Package "openssh"
    }

    # Install OpenSSH.Client on Windows 10+
    if ((Get-WindowsCapability -Online -Name OpenSSH.Client*).State -ne "Installed") {
    Add-WindowsCapability -Online -Name OpenSSH.Client*
    }

    # Configure git
    Install-ScoopApp -Package "git"
    Install-WinGetApp -PackageID "Git.Git"
    if (!$(git config --global credential.helper) -eq "manager-core") {
    git config --global credential.helper manager-core
    }
    @@ -210,11 +222,6 @@ if ((Get-Service -Name ssh-agent).Status -ne "Running") {
    Start-Process -FilePath "PowerShell" -ArgumentList "Set-Service","ssh-agent","-StartupType","Manual" -Verb RunAs -Wait -WindowStyle Hidden
    }

    # Only install OpenSSH Package, if not on Windows 10
    if ([Environment]::OSVersion.Version.Major -lt 10) {
    Install-ScoopApp -Package "openssh"
    }

    # Configure Aria2 Download Manager
    Install-ScoopApp -Package "aria2"
    if (!$(scoop config aria2-enabled) -eq $True) {
    @@ -244,7 +251,7 @@ scoop bucket add foosel https://github.com/foosel/scoop-bucket
    # UNIX Tools
    Write-Verbose -Message "Removing curl Alias..."
    if (Get-Alias -Name curl -ErrorAction SilentlyContinue) {
    Remove-Item alias:curl
    Remove-Item alias:curl
    }
    if (!($Env:TERM)) {
    Write-Verbose -Message "Setting TERM User Environment Variable"
    @@ -273,7 +280,6 @@ if ($HomeWorkstation) {
    # Install Scoop Packages
    $Scoop = @(
    "scoop-tray",
    "clink",
    "concfg",
    "curl",
    "busybox",
    @@ -283,34 +289,34 @@ $Scoop = @(
    "cacert",
    "colortool",
    "sudo",
    "openjdk",
    #"openjdk",
    "icedtea-web",
    "go",
    #"go",
    "python",
    "gpg",
    "imgburn",
    "paint.net",
    "putty",
    "winscp",
    #"putty",
    #"winscp",
    "spacesniffer",
    "filebot",
    "rufus",
    "etcher",
    "cpu-z",
    "gpu-z",
    #"filebot",
    #"rufus",
    #"etcher",
    #"cpu-z",
    #"gpu-z",
    "ssd-z",
    "hwmonitor",
    "crystaldiskmark",
    "powertoys",
    #"hwmonitor",
    #"crystaldiskmark",
    "hotkeyslist",
    "open-log-viewer",
    "baretail",
    "bleachbit",
    #"bleachbit",
    "hosts-file-editor",
    "minio-client",
    "lessmsi",
    "mqtt-explorer",
    "tftpd",
    "restic",
    "driverstoreexplorer",
    "sysinternals")#,"rktools2k3")
    foreach ($item in $Scoop) {
    @@ -323,14 +329,14 @@ if ($HomeWorkstation) {
    $Scoop = @(
    "ffmpeg",
    "mpv",
    "vlc",
    #"vlc",
    "lame",
    "musicbee",
    "mp3tag",
    "mkvtoolnix",
    #"mp3tag",
    #"mkvtoolnix",
    "obs-studio",
    "yt-dlp",
    "ocenaudio",
    #"ocenaudio",
    "mediainfo",
    "mediainfo-gui",
    "cdrtools",
    @@ -349,6 +355,18 @@ $WinGet = @(
    "Microsoft.dotnetRuntime.5-x64",
    "Microsoft.dotnetRuntime.6-x64",
    "Microsoft.WindowsTerminal",
    "Microsoft.PowerToys",
    "Obsidian.Obsidian",
    "Microsoft.OpenJDK.17",
    "GoLang.Go.1.19",
    "chrisant996.Clink",
    "PuTTY.PuTTY",
    "WinSCP.WinSCP",
    "Rufus.Rufus",
    "Balena.Etcher",
    "CPUID.HWMonitor",
    "CrystalDewWorld.CrystalDiskMark",
    "BleachBit.BleachBit",
    "TeamViewer.TeamViewer",
    "Google.Chrome",
    "Lexikos.AutoHotkey",
    @@ -378,6 +396,14 @@ if ($HomeWorkstation) {
    "clsid2.mpc-hc",
    "Plex.Plex",
    "Plex.Plexamp",
    "PointPlanck.FileBot",
    "CPUID.CPU-Z",
    "TechPowerUp.GPU-Z",
    "VideoLAN.VLC",
    "Mp3tag.Mp3tag",
    "MoritzBunkus.MKVToolNix",
    "Ocenaudio.Ocenaudio",
    "OpenMPT.OpenMPT",
    "Romcenter.Romcenter",
    "Valve.Steam"
    )
    @@ -421,7 +447,7 @@ if ($HomeWorkstation) {
    # Install Steam AppID, if not already installed
    foreach ($item in $SteamDB) {
    if ($item -ne $InstalledIDs) {
    Start-Process -FilePath ".\steam.exe" -ArgumentList "-applaunch","$item" -WorkingDirectory "${Env:Programfiles(x86)}\Steam\" -Wait
    Start-Process -FilePath ".\steam.exe" -ArgumentList "-applaunch","$item" -WorkingDirectory "${Env:Programfiles(x86)}\Steam\" -Wait
    }
    }
    }
    @@ -513,6 +539,13 @@ if (!(Test-Path -Path "$Env:AppData\Microsoft\Windows\Start Menu\Programs\Startu
    $Shortcut.Save()
    }

    # Configure GO Environment
    if (!(Test-Path -Path "$Env:UserProfile\go\" -PathType Container)) {
    Write-Verbose -Message "Configuring GO Environment..."
    New-Item -Path "${Env:UserProfile}\go" -ItemType Directory | Out-Null
    [System.Environment]::SetEnvironmentVariable('GOPATH', "${Env:UserProfile}\go", 'USER')
    }

    # Customize DOS/PowerShell Environment
    Write-Verbose -Message "Customize DOS/PowerShell Environment..."
    if ((Get-ItemProperty -Path "HKCU:\Software\Microsoft\Command Processor").AutoRun -eq $Null) {
  9. mikepruett3 revised this gist Dec 26, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -34,7 +34,7 @@ function Install-WinGetApp {
    $listApp = winget list --exact -q $PackageID --accept-source-agreements
    if (!$listApp) {
    Write-Verbose -Message "Installing $Package"
    winget install --exact --silent $PackageID --accept-source-agreements --accept-package-agreements
    winget install --silent --id $PackageID --accept-source-agreements --accept-package-agreements
    } else {
    Write-Verbose -Message "Package $PackageID already installed! Skipping..."
    }
  10. mikepruett3 revised this gist Dec 26, 2022. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -31,10 +31,10 @@ function Install-WinGetApp {
    )
    Write-Verbose -Message "Preparing to install $PackageID"
    # Added accept options based on this issue - https://github.com/microsoft/winget-cli/issues/1559
    $listApp = winget list --exact -q $PackageID --accept-source-agreements --accept-package-agreements
    $listApp = winget list --exact -q $PackageID --accept-source-agreements
    if (!$listApp) {
    Write-Verbose -Message "Installing $Package"
    winget install --exact --silent $PackageID
    winget install --exact --silent $PackageID --accept-source-agreements --accept-package-agreements
    } else {
    Write-Verbose -Message "Package $PackageID already installed! Skipping..."
    }
  11. mikepruett3 revised this gist Aug 17, 2022. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -149,15 +149,15 @@ if ((Get-ExecutionPolicy -Scope CurrentUser) -notcontains "Unrestricted") {
    }

    # Install Scoop, if not already installed
    $scoopInstalled = Get-Command "scoop"
    if (!$scoopInstalled) {
    #$scoopInstalled = Get-Command "scoop"
    if ( !(Get-Command -Name "scoop" -CommandType Application -ErrorAction SilentlyContinue | Out-Null) ) {
    Write-Verbose -Message "Installing Scoop..."
    iex ((New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh'))
    }

    # Install Chocolatey, if not already installed
    $chocoInstalled = Get-Command "choco" -CommandType Application -ErrorAction Ignore
    if (!$chocoInstalled) {
    #$chocoInstalled = Get-Command -Name "choco" -CommandType Application -ErrorAction SilentlyContinue | Out-Null
    if (! (Get-Command -Name "choco" -CommandType Application -ErrorAction SilentlyContinue | Out-Null) ) {
    Write-Verbose -Message "Installing Chocolatey..."
    @'
    [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
  12. mikepruett3 revised this gist May 24, 2022. 1 changed file with 10 additions and 6 deletions.
    16 changes: 10 additions & 6 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -283,7 +283,6 @@ $Scoop = @(
    "cacert",
    "colortool",
    "sudo",
    "vscode",
    "openjdk",
    "icedtea-web",
    "go",
    @@ -387,6 +386,9 @@ if ($HomeWorkstation) {
    }
    }

    # Custom WinGet install for VSCode
    winget install Microsoft.VisualStudioCode --override '/SILENT /mergetasks="!runcode,addcontextmenufiles,addcontextmenufolders"'

    # Install Chocolatey Packages
    $Choco = @(
    "syspin",
    @@ -494,6 +496,8 @@ if ($HomeWorkstation) {
    # Install WildMIDI from Github
    Install-CustomApp -URL "https://github.com/Mindwerks/wildmidi/releases/download/wildmidi-0.4.4/wildmidi-0.4.4-win64.zip"
    Move-Item -Path "$Env:UserProfile\bin\wildmidi*\" -Destination "$Env:UserProfile\bin\WildMIDI\"
    # Install Aaru from Github
    Install-CustomApp -URL "https://github.com/aaru-dps/Aaru/releases/download/v5.3.1/aaru-5.3.1_windows_x64.zip" -Folder "Aaru"
    }

    # Create scoop-tray shortcut in shell:startup
    @@ -517,11 +521,11 @@ if ((Get-ItemProperty -Path "HKCU:\Software\Microsoft\Command Processor").AutoRu
    Start-Process -FilePath "cmd" -ArgumentList "/c","concfg","import","solarized-dark" -Verb RunAs -Wait

    # Install Visual Studio Code Integrations
    if (!(Get-Item -Path "HKCU:\Software\Classes\Directory\shell\Open with &Code" -ErrorAction Ignore)) {
    Write-Verbose -Message "Install Visual Studio Code Integrations..."
    Start-Process -FilePath "cmd" -ArgumentList "/c","reg","import","%UserProfile%\scoop\apps\vscode\current\install-context.reg" -Verb RunAs -Wait -WindowStyle Hidden
    Start-Process -FilePath "cmd" -ArgumentList "/c","reg","import","%UserProfile%\scoop\apps\vscode\current\nstall-associations.reg" -Verb RunAs -Wait -WindowStyle Hidden
    }
    #if (!(Get-Item -Path "HKCU:\Software\Classes\Directory\shell\Open with &Code" -ErrorAction Ignore)) {
    # Write-Verbose -Message "Install Visual Studio Code Integrations..."
    # Start-Process -FilePath "cmd" -ArgumentList "/c","reg","import","%UserProfile%\scoop\apps\vscode\current\install-context.reg" -Verb RunAs -Wait -WindowStyle Hidden
    # Start-Process -FilePath "cmd" -ArgumentList "/c","reg","import","%UserProfile%\scoop\apps\vscode\current\nstall-associations.reg" -Verb RunAs -Wait -WindowStyle Hidden
    #}

    # Pin Run to Taskbar
    #Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:AppData\Microsoft\Windows\Start Menu\Programs\System Tools\Run.lnk'","c:5386" -Wait -NoNewWindow
  13. mikepruett3 revised this gist May 8, 2022. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -345,8 +345,10 @@ if ($HomeWorkstation) {

    # Install WinGet Packages
    $WinGet = @(
    "Microsoft.dotNetFramework",
    "Microsoft.dotnetRuntime.3-x64",
    "Microsoft.dotnetRuntime.5-x64",
    "Microsoft.dotnetRuntime.6-x64",
    "Microsoft.WindowsTerminal",
    "TeamViewer.TeamViewer",
    "Google.Chrome",
  14. mikepruett3 revised this gist Apr 25, 2022. 1 changed file with 172 additions and 4 deletions.
    176 changes: 172 additions & 4 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -54,6 +54,71 @@ function Install-ChocoApp {
    }
    }

    function Extract-Download {
    param (
    [string]$Folder,
    [string]$File
    )
    if (!(Test-Path -Path "$Folder" -PathType Container)) {
    Write-Error "$Folder does not exist!!!"
    Break
    }
    if (Test-Path -Path "$File" -PathType Leaf) {
    switch ($File.Split(".") | Select-Object -Last 1) {
    "rar" { Start-Process -FilePath "UnRar.exe" -ArgumentList "x","-op'$Folder'","-y","$File" -WorkingDirectory "$Env:ProgramFiles\WinRAR\" -Wait | Out-Null }
    "zip" { 7z x -o"$Folder" -y "$File" | Out-Null }
    "7z" { 7z x -o"$Folder" -y "$File" | Out-Null }
    "exe" { 7z x -o"$Folder" -y "$File" | Out-Null }
    Default { Write-Error "No way to Extract $File !!!"; Break }
    }
    }
    }

    function Download-CustomApp {
    param (
    [string]$Link,
    [string]$Folder
    )
    if ((curl -sIL "$Link" | Select-String -Pattern "Content-Disposition") -ne $Null) {
    $Package = $(curl -sIL "$Link" | Select-String -Pattern "filename=" | Split-String -Separator "=" | Select-Object -Last 1).Trim('"')
    } else {
    $Package = $Link.split("/") | Select-Object -Last 1
    }
    Write-Verbose -Message "Preparing to download $Package"
    aria2c --quiet --dir="$Folder" "$Link"
    Return $Package
    }

    function Install-CustomApp {
    param (
    [string]$URL,
    [string]$Folder
    )
    $Package = Download-CustomApp -Link $URL -Folder "$Env:UserProfile\Downloads\"
    if (Test-Path -Path "$Env:UserProfile\Downloads\$Package" -PathType Leaf) {
    if (Test-Path Variable:Folder) {
    if (!(Test-Path -Path "$Env:UserProfile\bin\$Folder")) {
    New-Item -Path "$Env:UserProfile\bin\$Folder" -ItemType Directory | Out-Null
    }
    Extract-Download -Folder "$Env:UserProfile\bin\$Folder" -File "$Env:UserProfile\Downloads\$Package"
    } else {
    Extract-Download -Folder "$Env:UserProfile\bin\" -File "$Env:UserProfile\Downloads\$Package"
    }
    Remove-Item -Path "$Env:UserProfile\Downloads\$Package"
    }
    }

    function Install-CustomPackage {
    param (
    [string]$URL
    )
    $Package = Download-CustomApp -Link $URL
    if (Test-Path -Path "$Env:UserProfile\Downloads\$Package" -PathType Leaf) {
    Start-Process -FilePath ".\$Package" -ArgumentList "/S" -WorkingDirectory "${Env:UserProfile}\Downloads\" -Verb RunAs -Wait #-WindowStyle Hidden
    Remove-Item -Path "$Env:UserProfile\Downloads\$Package"
    }
    }

    function Remove-InstalledApp {
    param (
    [string]$Package
    @@ -173,6 +238,7 @@ Register-ScheduledTask -TaskName "Aria2RPC" -Action $Action -Trigger $Trigger -P
    ## Add Buckets
    Enable-Bucket -Bucket "extras"
    Enable-Bucket -Bucket "java"
    Enable-Bucket -Bucket "nirsoft"
    scoop bucket add foosel https://github.com/foosel/scoop-bucket

    # UNIX Tools
    @@ -192,6 +258,18 @@ if ($(Read-Host -Prompt "Is this a workstation for Home use (y/n)?") -eq "y") {
    $HomeWorkstation = $False
    }

    # Home Workstation Configurations
    if ($HomeWorkstation) {
    # Adding games bucket
    Enable-Bucket -Bucket "games"
    # Create $Env:UserProfile\bin, if not exist
    if (!(Test-Path -Path $Env:UserProfile\bin)) {
    Write-Verbose -Message "Creating bin directory in $Env:UserProfile"
    New-Item -Path $Env:UserProfile\bin -ItemType Directory | Out-Null
    #[System.Environment]::SetEnvironmentVariable("PATH", $Env:PATH + ";$Env:UserProfile\bin","USER")
    }
    }

    # Install Scoop Packages
    $Scoop = @(
    "scoop-tray",
    @@ -225,13 +303,16 @@ $Scoop = @(
    "hwmonitor",
    "crystaldiskmark",
    "powertoys",
    "hotkeyslist",
    "open-log-viewer",
    "baretail",
    "bleachbit",
    "hosts-file-editor",
    "minio-client",
    "lessmsi",
    "mqtt-explorer",
    "tftpd",
    "driverstoreexplorer",
    "sysinternals")#,"rktools2k3")
    foreach ($item in $Scoop) {
    Install-ScoopApp -Package "$item"
    @@ -254,7 +335,9 @@ if ($HomeWorkstation) {
    "mediainfo",
    "mediainfo-gui",
    "cdrtools",
    "cuetools",)
    "cuetools",
    "betterjoy",
    "schismtracker")
    foreach ($item in $Scoop) {
    Install-ScoopApp -Package "$item"
    }
    @@ -281,6 +364,9 @@ foreach ($item in $WinGet) {
    Install-WinGetApp -PackageID "$item"
    }

    # Add Directories to User Path
    #[System.Environment]::SetEnvironmentVariable("PATH", $Env:PATH + ";$Env:ProgramFiles\WinRAR","USER")

    # Install WinGet Packages, if Home Workstation
    if ($HomeWorkstation) {
    Remove-Variable -Name "WinGet"
    @@ -291,13 +377,26 @@ if ($HomeWorkstation) {
    "clsid2.mpc-hc",
    "Plex.Plex",
    "Plex.Plexamp",
    "Romcenter.Romcenter",
    "Valve.Steam"
    )
    foreach ($item in $WinGet) {
    Install-WinGetApp -PackageID "$item"
    }
    }

    # Install Chocolatey Packages
    $Choco = @(
    "syspin",
    "sd-card-formatter",
    "winimage",
    "winsetupfromusb",
    "fluidsynth"
    )
    foreach ($item in $Choco) {
    Install-ChocoApp -Package "$item"
    }

    # Install Steam Applications
    if ($HomeWorkstation) {
    # Get Steam AppID's from https://steamdb.info/
    @@ -323,6 +422,78 @@ if ($HomeWorkstation) {
    }
    }

    # Install Custom Packages
    # Instal RawWrite for Windows from Chrysocome
    Install-CustomApp -URL "http://www.chrysocome.net/downloads/0d23e6a31f1d37850fc2040eec98e9f9/rawwritewin-0.7.zip" -Folder "RawWrite"
    # Install Tasmota Device Manager from Github
    New-Item -Path "$Env:UserProfile\bin\TasmotaDM" -ItemType Directory | Out-Null
    Download-CustomApp -Link "https://github.com/jziolkowski/tdm/releases/download/v0.2.11/tdmgr_0.2.11.exe" -Folder "$Env:UserProfile\bin\TasmotaDM" | Out-Null
    # Install HDD Raw Copy Tool from HDDGURU
    New-Item -Path "$Env:UserProfile\bin\HDDRawCopy" -ItemType Directory | Out-Null
    Download-CustomApp -Link "https://hddguru.com/software/HDD-Raw-Copy-Tool/HDDRawCopy1.10Portable.exe" -Folder "$Env:UserProfile\bin\HDDRawCopy" | Out-Null
    # Install XVI32 from Christian Maas
    Install-CustomApp -URL "http://www.handshake.de/user/chmaas/delphi/download/xvi32.zip" -Folder "XVI32"
    # Install dnSpy from Github
    Install-CustomApp -URL "https://github.com/dnSpy/dnSpy/releases/download/v6.1.8/dnSpy-net-win64.zip" -Folder "dnSpy"
    # Install ei.cfg Removal Utility from code.kliu.org
    Install-CustomApp -URL "https://code.kliu.org/misc/winisoutils/eicfg_removal_utility.zip" -Folder "ei.cfg-removal-utility"
    # Install HSFExplorer from SourceForge
    Install-CustomPackage -URL "https://downloads.sourceforge.net/project/catacombae/HFSExplorer/2021.10.9/hfsexplorer-2021.10.9-setup.exe"
    # Install RipMe from Github
    New-Item -Path "$Env:UserProfile\bin\RipMe" -ItemType Directory | Out-Null
    Download-CustomApp -Link "https://github.com/RipMeApp/ripme/releases/download/1.7.95/ripme.jar" -Folder "$Env:UserProfile\bin\RipMe" | Out-Null
    # Install EasyEDA Router from EasyEDA
    Install-CustomApp -URL "https://image.easyeda.com/files/easyeda-router-windows-x64-v0.8.11.zip"

    # Install Custom Packages for Home Workstations
    if ($HomeWorkstation) {
    # Install CDMage from Major Geeks
    Install-CustomApp -URL "https://files1.majorgeeks.com/10afebdbffcd4742c81a3cb0f6ce4092156b4375/cddvd/CDmage1-01-5.exe" -Folder "CDMage"
    # Install ACiD View from SourceForge
    Install-CustomApp -URL "https://downloads.sourceforge.net/project/acidview6-win32/acidview6-win32/6.10/avw-610.zip" -Folder "ACiDView"
    # Install NohBoard from SourceForge
    Install-CustomApp -URL "https://downloads.sourceforge.net/project/nohboard/NohBoard-v0.17b.zip"
    # Install PSX2PSP from PSX-Place
    Install-CustomApp -URL "https://www.psx-place.com/resources/psx2psp.586/download?version=898"
    # Install CLRMamePro from EMULab
    Install-CustomPackage -URL "https://mamedev.emulab.it/clrmamepro/binaries/cmp4044c_64.exe"
    # Install Soundfont Midi Player from Falcosoft
    Install-CustomApp -URL "https://falcosoft.hu/midiplayer_60_x64.zip"
    # Install SkraperUI fro Skraper
    Install-CustomApp -URL "https://www.skraper.net/download/beta/Skraper-1.1.1.7z" -Folder "SkraperUI"
    # Install WinHIIP from PSX-Place
    Install-CustomApp -URL "https://www.psx-place.com/resources/obsolete-winhiip-by-gadgetfreak.666/download?version=1066" -Folder "WinHIIP"
    # Install WinBin2Iso from Major Geeks
    Install-CustomApp -URL "https://www.softwareok.com/Download/WinBin2Iso.zip" -Folder "WinBin2Iso"
    # Install ArchiSteamFarm from Github
    Install-CustomApp -URL "https://github.com/JustArchiNET/ArchiSteamFarm/releases/download/5.2.4.2/ASF-win-x64.zip" -Folder "ArchiSteamFarm2"
    # Install TwilightMenu++ Boxart Downloader from Github
    Install-CustomApp -URL "https://github.com/KirovAir/TwilightBoxart/releases/download/0.7/TwilightBoxart-Windows-UX.zip" -Folder "TwilightMenuBoxArt"
    # Install ISO Toolkit from Major Geeks
    New-Item -Path "$Env:UserProfile\bin\ISOToolkit" -ItemType Directory | Out-Null
    Download-CustomApp -Link "https://files1.majorgeeks.com/10afebdbffcd4742c81a3cb0f6ce4092156b4375/cddvd/ISOToolKit.exe" -Folder "$Env:UserProfile\bin\ISOToolkit" | Out-Null
    # Install binmerge from Github
    Install-CustomApp -URL "https://github.com/putnam/binmerge/releases/download/1.0.1/binmerge-1.0.1-win64.zip"
    # Install PPF-o-Matic from PSX-Place
    Install-CustomApp -URL "https://www.psx-place.com/resources/ppf-o-matic.507/download?version=717" -Folder "ppf-o-matic"
    # Install MBCord from Github
    Install-CustomApp -URL "https://github.com/oonqt/MBCord/releases/download/2.3.13/MBCord-win32-x64.zip" -Folder "MBCord"
    # Install bchunk from Github
    Install-CustomApp -URL "https://github.com/extramaster/bchunk/releases/download/v1.2.1_repub.1/bchunk.v1.2.1_repub.1.zip"
    # Install CHDMan from MAMEDEV
    $Package = Download-CustomApp -Link "https://github.com/mamedev/mame/releases/download/mame0242/mame0242b_64bit.exe" -Folder "$Env:UserProfile\Downloads\"
    7z e -o"$Env:UserProfile\bin\" -y "$Env:UserProfile\Downloads\$Package" chdman.exe | Out-Null
    Remove-Item -Path "$Env:UserProfile\Downloads\$Package"
    # Install ExifTool from ExifTool.org
    Install-CustomApp -URL "https://www.exiftool.org/exiftool-12.41.zip"
    Move-Item -Path "$Env:UserProfile\bin\exiftool*.exe" -Destination "$Env:UserProfile\bin\exiftool.exe"
    # Install OpenMPT123 from OpenMPT
    Install-CustomApp -URL "https://lib.openmpt.org/files/libopenmpt/bin/libopenmpt-0.6.3+release.bin.windows.zip" -Folder "OpenMPT123"
    # Install WildMIDI from Github
    Install-CustomApp -URL "https://github.com/Mindwerks/wildmidi/releases/download/wildmidi-0.4.4/wildmidi-0.4.4-win64.zip"
    Move-Item -Path "$Env:UserProfile\bin\wildmidi*\" -Destination "$Env:UserProfile\bin\WildMIDI\"
    }

    # Create scoop-tray shortcut in shell:startup
    if (!(Test-Path -Path "$Env:AppData\Microsoft\Windows\Start Menu\Programs\Startup\scoop-tray.lnk" -PathType Leaf)) {
    Write-Verbose -Message "Create scoop-tray shortcut in shell:startup..."
    @@ -350,9 +521,6 @@ if (!(Get-Item -Path "HKCU:\Software\Classes\Directory\shell\Open with &Code" -E
    Start-Process -FilePath "cmd" -ArgumentList "/c","reg","import","%UserProfile%\scoop\apps\vscode\current\nstall-associations.reg" -Verb RunAs -Wait -WindowStyle Hidden
    }

    # Install syspin
    Write-Verbose -Message "Installing syspin..."
    Install-ChocoApp -Package "syspin"
    # Pin Run to Taskbar
    #Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:AppData\Microsoft\Windows\Start Menu\Programs\System Tools\Run.lnk'","c:5386" -Wait -NoNewWindow
    # Pin Google Chrome to Taskbar
  15. mikepruett3 revised this gist Apr 24, 2022. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -78,6 +78,9 @@ function Enable-Bucket {
    if ((Get-ExecutionPolicy -Scope CurrentUser) -notcontains "Unrestricted") {
    Write-Verbose -Message "Setting Execution Policy for Current User..."
    Start-Process -FilePath "PowerShell" -ArgumentList "Set-ExecutionPolicy","-Scope","CurrentUser","-ExecutionPolicy","Unrestricted","-Force" -Verb RunAs -Wait
    Write-Output "Restart/Re-Run script!!!"
    Start-Sleep -Seconds 10
    Break
    }

    # Install Scoop, if not already installed
    @@ -411,4 +414,4 @@ if (!$wslInstalled) {
    }
    Install-WinGetApp -PackageID Canonical.Ubuntu.2004
    Write-Output "Install complete! Please reboot your machine/worksation!"
    Start-Sleep -Seconds 5
    Start-Sleep -Seconds 10
  16. mikepruett3 revised this gist Apr 23, 2022. 1 changed file with 28 additions and 2 deletions.
    30 changes: 28 additions & 2 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -251,7 +251,7 @@ if ($HomeWorkstation) {
    "mediainfo",
    "mediainfo-gui",
    "cdrtools",
    "cuetools")
    "cuetools",)
    foreach ($item in $Scoop) {
    Install-ScoopApp -Package "$item"
    }
    @@ -287,13 +287,39 @@ if ($HomeWorkstation) {
    "AndreWiethoff.ExactAudioCopy",
    "clsid2.mpc-hc",
    "Plex.Plex",
    "Plex.Plexamp"
    "Plex.Plexamp",
    "Valve.Steam"
    )
    foreach ($item in $WinGet) {
    Install-WinGetApp -PackageID "$item"
    }
    }

    # Install Steam Applications
    if ($HomeWorkstation) {
    # Get Steam AppID's from https://steamdb.info/
    # https://developer.valvesoftware.com/wiki/Command_Line_Options#Steam_.28Windows.29
    $SteamDB = @(
    "1026460" #Lossless Scaling Demo,
    "431960" #Wallpaper Engine,
    "388080" #Borderless Gaming,
    "367670" #Controller Companion,
    "227260" #DisplayFusion,
    "274920" #FaceRig
    )
    # Collect installed Steam AppID's
    $InstalledIDs = [System.Collections.ArrayList]::new()
    foreach ($item in (Get-ChildItem -Path "${Env:Programfiles(x86)}\Steam\steamapps\common\" -Filter "steam_appid.txt" -Recurse).VersionInfo.FileName) {
    [void]$InstalledIDs.Add((Get-Content -Path $item))
    }
    # Install Steam AppID, if not already installed
    foreach ($item in $SteamDB) {
    if ($item -ne $InstalledIDs) {
    Start-Process -FilePath ".\steam.exe" -ArgumentList "-applaunch","$item" -WorkingDirectory "${Env:Programfiles(x86)}\Steam\" -Wait
    }
    }
    }

    # Create scoop-tray shortcut in shell:startup
    if (!(Test-Path -Path "$Env:AppData\Microsoft\Windows\Start Menu\Programs\Startup\scoop-tray.lnk" -PathType Leaf)) {
    Write-Verbose -Message "Create scoop-tray shortcut in shell:startup..."
  17. mikepruett3 revised this gist Apr 23, 2022. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -370,7 +370,9 @@ Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:ProgramData\M

    # Remove unused Packages/Applications
    Write-Verbose -Message "Removing Unused Applications..."
    $RemoveApps = @("*3DPrint*","Microsoft.MixedReality.Portal")
    $RemoveApps = @(
    "*3DPrint*",
    "Microsoft.MixedReality.Portal")
    foreach ($item in $RemoveApps) {
    Remove-InstalledApp -Package $item
    }
  18. mikepruett3 revised this gist Apr 23, 2022. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -315,9 +315,11 @@ if ((Get-ItemProperty -Path "HKCU:\Software\Microsoft\Command Processor").AutoRu
    Start-Process -FilePath "cmd" -ArgumentList "/c","concfg","import","solarized-dark" -Verb RunAs -Wait

    # Install Visual Studio Code Integrations
    Write-Verbose -Message "Install Visual Studio Code Integrations..."
    Start-Process -FilePath "cmd" -ArgumentList "/c","reg","import","%UserProfile%\scoop\apps\vscode\current\install-context.reg" -Verb RunAs -Wait -WindowStyle Hidden
    Start-Process -FilePath "cmd" -ArgumentList "/c","reg","import","%UserProfile%\scoop\apps\vscode\current\nstall-associations.reg" -Verb RunAs -Wait -WindowStyle Hidden
    if (!(Get-Item -Path "HKCU:\Software\Classes\Directory\shell\Open with &Code" -ErrorAction Ignore)) {
    Write-Verbose -Message "Install Visual Studio Code Integrations..."
    Start-Process -FilePath "cmd" -ArgumentList "/c","reg","import","%UserProfile%\scoop\apps\vscode\current\install-context.reg" -Verb RunAs -Wait -WindowStyle Hidden
    Start-Process -FilePath "cmd" -ArgumentList "/c","reg","import","%UserProfile%\scoop\apps\vscode\current\nstall-associations.reg" -Verb RunAs -Wait -WindowStyle Hidden
    }

    # Install syspin
    Write-Verbose -Message "Installing syspin..."
  19. mikepruett3 revised this gist Apr 23, 2022. 1 changed file with 25 additions and 9 deletions.
    34 changes: 25 additions & 9 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -66,7 +66,7 @@ function Enable-Bucket {
    param (
    [string]$Bucket
    )
    if (! ($(scoop bucket list) -like "$Bucket") ) {
    if (!($(scoop bucket list).Name -eq "$Bucket")) {
    Write-Verbose -Message "Adding Bucket $Bucket to scoop..."
    scoop bucket add $Bucket
    } else {
    @@ -131,7 +131,9 @@ Add-AppxPackage -Path $latestRelease.browser_download_url

    # Configure git
    Install-ScoopApp -Package "git"
    git config --global credential.helper manager-core
    if (!$(git config --global credential.helper) -eq "manager-core") {
    git config --global credential.helper manager-core
    }
    if (!($Env:GIT_SSH)) {
    Write-Verbose -Message "Setting GIT_SSH User Environment Variable"
    [System.Environment]::SetEnvironmentVariable('GIT_SSH', (Resolve-Path (scoop which ssh)), 'USER')
    @@ -147,15 +149,23 @@ if ([Environment]::OSVersion.Version.Major -lt 10) {

    # Configure Aria2 Download Manager
    Install-ScoopApp -Package "aria2"
    scoop config aria2-enabled true
    scoop config aria2-warning-enabled false
    if (!$(scoop config aria2-enabled) -eq $True) {
    scoop config aria2-enabled true
    }
    if (!$(scoop config aria2-warning-enabled) -eq $False) {
    scoop config aria2-warning-enabled false
    }
    if (!(Get-ScheduledTaskInfo -TaskName "Aria2RPC" -ErrorAction Ignore)) {
    @'
    $Action = New-ScheduledTaskAction -Execute $Env:UserProfile\scoop\apps\aria2\current\aria2c.exe -Argument "--enable-rpc --rpc-listen-all" -WorkingDirectory $Env:UserProfile\Downloads
    $Trigger = New-ScheduledTaskTrigger -AtStartup
    Register-ScheduledTask -TaskName "Aria2RPC" -Action $Action -Trigger $Trigger
    $Principal = New-ScheduledTaskPrincipal -UserID "$Env:ComputerName\$Env:Username" -LogonType S4U
    $Settings = New-ScheduledTaskSettingsSet -ExecutionTimeLimit 0 -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
    Register-ScheduledTask -TaskName "Aria2RPC" -Action $Action -Trigger $Trigger -Principal $Principal -Settings $Settings
    '@ > $Env:Temp\aria2.ps1
    Start-Process -FilePath "PowerShell" -ArgumentList "$Env:Temp\aria2.ps1" -Verb RunAs -Wait -WindowStyle Hidden
    Remove-Item -Path $Env:Temp\aria2.ps1 -Force
    Start-Process -FilePath "PowerShell" -ArgumentList "$Env:Temp\aria2.ps1" -Verb RunAs -Wait #-WindowStyle Hidden
    Remove-Item -Path $Env:Temp\aria2.ps1 -Force
    }

    ## Add Buckets
    Enable-Bucket -Bucket "extras"
    @@ -299,7 +309,9 @@ if (!(Test-Path -Path "$Env:AppData\Microsoft\Windows\Start Menu\Programs\Startu

    # Customize DOS/PowerShell Environment
    Write-Verbose -Message "Customize DOS/PowerShell Environment..."
    Start-Process -FilePath "cmd" -ArgumentList "/c","clink","autorun","install" -Wait -WindowStyle Hidden
    if ((Get-ItemProperty -Path "HKCU:\Software\Microsoft\Command Processor").AutoRun -eq $Null) {
    Start-Process -FilePath "cmd" -ArgumentList "/c","clink","autorun","install" -Wait -WindowStyle Hidden
    }
    Start-Process -FilePath "cmd" -ArgumentList "/c","concfg","import","solarized-dark" -Verb RunAs -Wait

    # Install Visual Studio Code Integrations
    @@ -362,7 +374,11 @@ foreach ($item in $RemoveApps) {
    }

    # Install Windows SubSystems for Linux
    Start-Process -FilePath "PowerShell" -ArgumentList "wsl","--install" -Verb RunAs -Wait -WindowStyle Hidden
    $wslInstalled = Get-Command "wsl" -CommandType Application -ErrorAction Ignore
    if (!$wslInstalled) {
    Write-Verbose -Message "Installing Windows SubSystems for Linux..."
    Start-Process -FilePath "PowerShell" -ArgumentList "wsl","--install" -Verb RunAs -Wait -WindowStyle Hidden
    }
    Install-WinGetApp -PackageID Canonical.Ubuntu.2004
    Write-Output "Install complete! Please reboot your machine/worksation!"
    Start-Sleep -Seconds 5
  20. mikepruett3 revised this gist Apr 23, 2022. 1 changed file with 20 additions and 16 deletions.
    36 changes: 20 additions & 16 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -285,15 +285,17 @@ if ($HomeWorkstation) {
    }

    # Create scoop-tray shortcut in shell:startup
    Write-Verbose -Message "Create scoop-tray shortcut in shell:startup..."
    $WSHShell = New-Object -ComObject WScript.Shell
    $Shortcut = $WSHShell.CreateShortcut("$Env:AppData\Microsoft\Windows\Start Menu\Programs\Startup\scoop-tray.lnk")
    $Shortcut.TargetPath = "$Env:UserProfile\scoop\apps\scoop-tray\current\scoop-tray.bat"
    $Shortcut.WindowStyle = 7
    $Shortcut.IconLocation = "%USERPROFILE%\scoop\apps\scoop-tray\current\updates-available.ico"
    $Shortcut.Description = "scoop-tray.bat"
    $Shortcut.WorkingDirectory = Split-Path "$Env:UserProfile\scoop\apps\scoop-tray\current\scoop-tray.bat" -Resolve
    $Shortcut.Save()
    if (!(Test-Path -Path "$Env:AppData\Microsoft\Windows\Start Menu\Programs\Startup\scoop-tray.lnk" -PathType Leaf)) {
    Write-Verbose -Message "Create scoop-tray shortcut in shell:startup..."
    $WSHShell = New-Object -ComObject WScript.Shell
    $Shortcut = $WSHShell.CreateShortcut("$Env:AppData\Microsoft\Windows\Start Menu\Programs\Startup\scoop-tray.lnk")
    $Shortcut.TargetPath = "$Env:UserProfile\scoop\apps\scoop-tray\current\scoop-tray.bat"
    $Shortcut.WindowStyle = 7
    $Shortcut.IconLocation = "%USERPROFILE%\scoop\apps\scoop-tray\current\updates-available.ico"
    $Shortcut.Description = "scoop-tray.bat"
    $Shortcut.WorkingDirectory = Split-Path "$Env:UserProfile\scoop\apps\scoop-tray\current\scoop-tray.bat" -Resolve
    $Shortcut.Save()
    }

    # Customize DOS/PowerShell Environment
    Write-Verbose -Message "Customize DOS/PowerShell Environment..."
    @@ -315,22 +317,24 @@ Write-Verbose -Message "Pin Google Chrome to Taskbar..."
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:ProgramData\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk'","c:5386" -Wait -NoNewWindow

    # Install my PowerShell dot files
    Write-Verbose -Message "Install my PowerShell dot files..."
    Start-Process -FilePath "PowerShell" -ArgumentList "git","clone","https://github.com/mikepruett3/dotposh.git","$Env:UserProfile\dotposh" -Wait -NoNewWindow
    if (!(Test-Path -Path "$Env:UserProfile\dotposh" -PathType Container)) {
    Write-Verbose -Message "Install my PowerShell dot files..."
    Start-Process -FilePath "PowerShell" -ArgumentList "git","clone","https://github.com/mikepruett3/dotposh.git","$Env:UserProfile\dotposh" -Wait -NoNewWindow
    @'
    New-Item -Path $Env:UserProfile\Documents\WindowsPowerShell -ItemType Directory -ErrorAction Ignore
    Remove-Item -Path $Env:UserProfile\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 -Force
    New-Item -Path $Env:UserProfile\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 -ItemType SymbolicLink -Target $Env:UserProfile\dotposh\profile.ps1
    '@ > $Env:Temp\dotposh.ps1
    Start-Process -FilePath "PowerShell" -ArgumentList "$Env:Temp\dotposh.ps1" -Verb RunAs -Wait -WindowStyle Hidden
    Remove-Item -Path $Env:Temp\dotposh.ps1 -Force
    Start-Process -FilePath "PowerShell" -ArgumentList "$Env:Temp\dotposh.ps1" -Verb RunAs -Wait -WindowStyle Hidden
    Remove-Item -Path $Env:Temp\dotposh.ps1 -Force
    @'
    cd $Env:UserProfile\dotposh
    git submodule init
    git submodule update
    '@ > $Env:Temp\submodule.ps1
    Start-Process -FilePath "PowerShell" -ArgumentList "$Env:Temp\submodule.ps1" -Wait -NoNewWindow
    Remove-Item -Path $Env:Temp\submodule.ps1 -Force
    Start-Process -FilePath "PowerShell" -ArgumentList "$Env:Temp\submodule.ps1" -Wait -NoNewWindow
    Remove-Item -Path $Env:Temp\submodule.ps1 -Force
    }

    # Pin PowerShell to Taskbar
    Write-Verbose -Message "Pin PowerShell to Taskbar..."
    @@ -361,4 +365,4 @@ foreach ($item in $RemoveApps) {
    Start-Process -FilePath "PowerShell" -ArgumentList "wsl","--install" -Verb RunAs -Wait -WindowStyle Hidden
    Install-WinGetApp -PackageID Canonical.Ubuntu.2004
    Write-Output "Install complete! Please reboot your machine/worksation!"
    Start-Sleep -Seconds 3
    Start-Sleep -Seconds 5
  21. mikepruett3 revised this gist Apr 23, 2022. No changes.
  22. mikepruett3 revised this gist Apr 23, 2022. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -173,7 +173,6 @@ if (!($Env:TERM)) {
    }

    # Check if Home Workstation
    Remove-Variable -Name "HomeWorkstation"
    if ($(Read-Host -Prompt "Is this a workstation for Home use (y/n)?") -eq "y") {
    $HomeWorkstation = $True
    } else {
  23. mikepruett3 revised this gist Apr 23, 2022. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -163,6 +163,7 @@ Enable-Bucket -Bucket "java"
    scoop bucket add foosel https://github.com/foosel/scoop-bucket

    # UNIX Tools
    Write-Verbose -Message "Removing curl Alias..."
    if (Get-Alias -Name curl -ErrorAction SilentlyContinue) {
    Remove-Item alias:curl
    }
    @@ -224,6 +225,7 @@ foreach ($item in $Scoop) {
    Install-ScoopApp -Package "$item"
    }

    # Install Scoop Packages, if Home Workstation
    if ($HomeWorkstation) {
    Remove-Variable -Name "Scoop"
    $Scoop = @(
    @@ -246,6 +248,7 @@ if ($HomeWorkstation) {
    }
    }

    # Install WinGet Packages
    $WinGet = @(
    "Microsoft.dotnetRuntime.3-x64",
    "Microsoft.dotnetRuntime.5-x64",
    @@ -266,6 +269,7 @@ foreach ($item in $WinGet) {
    Install-WinGetApp -PackageID "$item"
    }

    # Install WinGet Packages, if Home Workstation
    if ($HomeWorkstation) {
    Remove-Variable -Name "WinGet"
    $WinGet = @(
    @@ -282,6 +286,7 @@ if ($HomeWorkstation) {
    }

    # Create scoop-tray shortcut in shell:startup
    Write-Verbose -Message "Create scoop-tray shortcut in shell:startup..."
    $WSHShell = New-Object -ComObject WScript.Shell
    $Shortcut = $WSHShell.CreateShortcut("$Env:AppData\Microsoft\Windows\Start Menu\Programs\Startup\scoop-tray.lnk")
    $Shortcut.TargetPath = "$Env:UserProfile\scoop\apps\scoop-tray\current\scoop-tray.bat"
    @@ -292,21 +297,26 @@ $Shortcut.WorkingDirectory = Split-Path "$Env:UserProfile\scoop\apps\scoop-tray\
    $Shortcut.Save()

    # Customize DOS/PowerShell Environment
    Write-Verbose -Message "Customize DOS/PowerShell Environment..."
    Start-Process -FilePath "cmd" -ArgumentList "/c","clink","autorun","install" -Wait -WindowStyle Hidden
    Start-Process -FilePath "cmd" -ArgumentList "/c","concfg","import","solarized-dark" -Verb RunAs -Wait

    # Install Visual Studio Code Integrations
    Write-Verbose -Message "Install Visual Studio Code Integrations..."
    Start-Process -FilePath "cmd" -ArgumentList "/c","reg","import","%UserProfile%\scoop\apps\vscode\current\install-context.reg" -Verb RunAs -Wait -WindowStyle Hidden
    Start-Process -FilePath "cmd" -ArgumentList "/c","reg","import","%UserProfile%\scoop\apps\vscode\current\nstall-associations.reg" -Verb RunAs -Wait -WindowStyle Hidden

    # Install syspin
    Write-Verbose -Message "Installing syspin..."
    Install-ChocoApp -Package "syspin"
    # Pin Run to Taskbar
    #Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:AppData\Microsoft\Windows\Start Menu\Programs\System Tools\Run.lnk'","c:5386" -Wait -NoNewWindow
    # Pin Google Chrome to Taskbar
    Write-Verbose -Message "Pin Google Chrome to Taskbar..."
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:ProgramData\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk'","c:5386" -Wait -NoNewWindow

    # Install my PowerShell dot files
    Write-Verbose -Message "Install my PowerShell dot files..."
    Start-Process -FilePath "PowerShell" -ArgumentList "git","clone","https://github.com/mikepruett3/dotposh.git","$Env:UserProfile\dotposh" -Wait -NoNewWindow
    @'
    New-Item -Path $Env:UserProfile\Documents\WindowsPowerShell -ItemType Directory -ErrorAction Ignore
    @@ -324,6 +334,7 @@ Start-Process -FilePath "PowerShell" -ArgumentList "$Env:Temp\submodule.ps1" -Wa
    Remove-Item -Path $Env:Temp\submodule.ps1 -Force

    # Pin PowerShell to Taskbar
    Write-Verbose -Message "Pin PowerShell to Taskbar..."
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:AppData\Microsoft\Windows\Start Menu\Programs\Windows PowerShell\Windows PowerShell.lnk'","c:5386" -Wait -NoNewWindow

    # Install PowerShell 7
    @@ -337,9 +348,11 @@ iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -Quiet"
    Remove-Item -Path $Env:Temp\ps7.ps1 -Force
    }
    # Pin PowerShell 7 to Taskbar
    Write-Verbose -Message "Pin PowerShell 7 to Taskbar..."
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:ProgramData\Microsoft\Windows\Start Menu\Programs\PowerShell\PowerShell 7 (x64).lnk'","c:5386" -Wait -NoNewWindow

    # Remove unused Packages/Applications
    Write-Verbose -Message "Removing Unused Applications..."
    $RemoveApps = @("*3DPrint*","Microsoft.MixedReality.Portal")
    foreach ($item in $RemoveApps) {
    Remove-InstalledApp -Package $item
  24. mikepruett3 revised this gist Apr 23, 2022. 1 changed file with 122 additions and 70 deletions.
    192 changes: 122 additions & 70 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -162,8 +162,125 @@ Enable-Bucket -Bucket "extras"
    Enable-Bucket -Bucket "java"
    scoop bucket add foosel https://github.com/foosel/scoop-bucket

    # Configure scoop-tray
    Install-ScoopApp -Package "scoop-tray"
    # UNIX Tools
    if (Get-Alias -Name curl -ErrorAction SilentlyContinue) {
    Remove-Item alias:curl
    }
    if (!($Env:TERM)) {
    Write-Verbose -Message "Setting TERM User Environment Variable"
    [System.Environment]::SetEnvironmentVariable("TERM", "xterm-256color", "USER")
    }

    # Check if Home Workstation
    Remove-Variable -Name "HomeWorkstation"
    if ($(Read-Host -Prompt "Is this a workstation for Home use (y/n)?") -eq "y") {
    $HomeWorkstation = $True
    } else {
    $HomeWorkstation = $False
    }

    # Install Scoop Packages
    $Scoop = @(
    "scoop-tray",
    "clink",
    "concfg",
    "curl",
    "busybox",
    "fzf",
    "neovim",
    "pshazz",
    "cacert",
    "colortool",
    "sudo",
    "vscode",
    "openjdk",
    "icedtea-web",
    "go",
    "python",
    "gpg",
    "imgburn",
    "paint.net",
    "putty",
    "winscp",
    "spacesniffer",
    "filebot",
    "rufus",
    "etcher",
    "cpu-z",
    "gpu-z",
    "ssd-z",
    "hwmonitor",
    "crystaldiskmark",
    "powertoys",
    "open-log-viewer",
    "baretail",
    "bleachbit",
    "hosts-file-editor",
    "minio-client",
    "lessmsi",
    "mqtt-explorer",
    "sysinternals")#,"rktools2k3")
    foreach ($item in $Scoop) {
    Install-ScoopApp -Package "$item"
    }

    if ($HomeWorkstation) {
    Remove-Variable -Name "Scoop"
    $Scoop = @(
    "ffmpeg",
    "mpv",
    "vlc",
    "lame",
    "musicbee",
    "mp3tag",
    "mkvtoolnix",
    "obs-studio",
    "yt-dlp",
    "ocenaudio",
    "mediainfo",
    "mediainfo-gui",
    "cdrtools",
    "cuetools")
    foreach ($item in $Scoop) {
    Install-ScoopApp -Package "$item"
    }
    }

    $WinGet = @(
    "Microsoft.dotnetRuntime.3-x64",
    "Microsoft.dotnetRuntime.5-x64",
    "Microsoft.WindowsTerminal",
    "TeamViewer.TeamViewer",
    "Google.Chrome",
    "Lexikos.AutoHotkey",
    "SumatraPDF.SumatraPDF",
    "ScooterSoftware.BeyondCompare4",
    "Eassos.DiskGenius",
    "RevoUninstaller.RevoUninstaller",
    "ElaborateBytes.VirtualCloneDrive",
    "RARLab.WinRAR",
    "Piriform.Speccy",
    "Piriform.Defraggler"
    )
    foreach ($item in $WinGet) {
    Install-WinGetApp -PackageID "$item"
    }

    if ($HomeWorkstation) {
    Remove-Variable -Name "WinGet"
    $WinGet = @(
    "Discord.Discord",
    "HandBrake.HandBrake",
    "AndreWiethoff.ExactAudioCopy",
    "clsid2.mpc-hc",
    "Plex.Plex",
    "Plex.Plexamp"
    )
    foreach ($item in $WinGet) {
    Install-WinGetApp -PackageID "$item"
    }
    }

    # Create scoop-tray shortcut in shell:startup
    $WSHShell = New-Object -ComObject WScript.Shell
    $Shortcut = $WSHShell.CreateShortcut("$Env:AppData\Microsoft\Windows\Start Menu\Programs\Startup\scoop-tray.lnk")
    @@ -175,86 +292,20 @@ $Shortcut.WorkingDirectory = Split-Path "$Env:UserProfile\scoop\apps\scoop-tray\
    $Shortcut.Save()

    # Customize DOS/PowerShell Environment
    $DOSTools = @("clink","concfg")
    foreach ($item in $DOSTools) {
    Install-ScoopApp -Package "$item"
    }
    Start-Process -FilePath "cmd" -ArgumentList "/c","clink","autorun","install" -Wait -WindowStyle Hidden
    Start-Process -FilePath "cmd" -ArgumentList "/c","concfg","import","solarized-dark" -Verb RunAs -Wait

    # UNIX Tools
    if (Get-Alias -Name curl -ErrorAction SilentlyContinue) {
    Remove-Item alias:curl
    }
    $UnixTools = @("curl","busybox","fzf","neovim","pshazz","cacert","colortool","sudo")
    foreach ($item in $UnixTools) {
    Install-ScoopApp -Package "$item"
    }
    if (!($Env:TERM)) {
    Write-Verbose -Message "Setting TERM User Environment Variable"
    [System.Environment]::SetEnvironmentVariable("TERM", "xterm-256color", "USER")
    }

    # Development Tools
    $DevTools = @("vscode","openjdk","icedtea-web","go","python")
    foreach ($item in $DevTools) {
    Install-ScoopApp -Package "$item"
    }
    $DevTools = @("Microsoft.dotnetRuntime.3-x64","Microsoft.dotnetRuntime.5-x64")
    foreach ($item in $DevTools) {
    Install-WinGetApp -PackageID "$item"
    }
    # Install Visual Studio Code Integrations
    Start-Process -FilePath "cmd" -ArgumentList "/c","reg","import","%UserProfile%\scoop\apps\vscode\current\install-context.reg" -Verb RunAs -Wait -WindowStyle Hidden
    Start-Process -FilePath "cmd" -ArgumentList "/c","reg","import","%UserProfile%\scoop\apps\vscode\current\nstall-associations.reg" -Verb RunAs -Wait -WindowStyle Hidden

    # Usefull Tools
    $UsefullTools = @("gpg","imgburn","paint.net","putty","winscp","spacesniffer","filebot","rufus","etcher")
    foreach ($item in $UsefullTools) {
    Install-ScoopApp -Package "$item"
    }
    $UsefullTools = @("Microsoft.WindowsTerminal","Discord.Discord","TeamViewer.TeamViewer","Google.Chrome","Lexikos.AutoHotkey","SumatraPDF.SumatraPDF")
    foreach ($item in $UsefullTools) {
    Install-WinGetApp -PackageID "$item"
    }
    # Install syspin
    Install-ChocoApp -Package "syspin"
    #Start-Process -FilePath "PowerShell" -ArgumentList "choco","install","syspin","-y" -Verb RunAs -Wait
    # Pin Run to Taskbar
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:AppData\Microsoft\Windows\Start Menu\Programs\System Tools\Run.lnk'","c:5386" -Wait -NoNewWindow
    #Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:AppData\Microsoft\Windows\Start Menu\Programs\System Tools\Run.lnk'","c:5386" -Wait -NoNewWindow
    # Pin Google Chrome to Taskbar
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:ProgramData\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk'","c:5386" -Wait -NoNewWindow

    # Media Utilities
    $MediaUtils = @("ffmpeg","mpv","vlc","lame","musicbee","mp3tag","mkvtoolnix","obs-studio","yt-dlp","ocenaudio","mediainfo","mediainfo-gui","cdrtools","cuetools")
    foreach ($item in $MediaUtils) {
    Install-ScoopApp -Package "$item"
    }
    $MediaUtils = @("HandBrake.HandBrake","AndreWiethoff.ExactAudioCopy","clsid2.mpc-hc","Plex.Plex","Plex.Plexamp")
    foreach ($item in $MediaUtils) {
    Install-WinGetApp -PackageID "$item"
    }

    # System Utilities
    $SystemUtils = @("powertoys","open-log-viewer","baretail","bleachbit","hosts-file-editor","minio-client","lessmsi","mqtt-explorer","sysinternals")#,"rktools2k3")
    foreach ($item in $SystemUtils) {
    Install-ScoopApp -Package "$item"
    }
    $SystemUtils = @("ScooterSoftware.BeyondCompare4","Eassos.DiskGenius","RevoUninstaller.RevoUninstaller","ElaborateBytes.VirtualCloneDrive","RARLab.WinRAR")
    foreach ($item in $SystemUtils) {
    Install-WinGetApp -PackageID "$item"
    }

    # Hardware Monitoring
    $HWMon = @("cpu-z","gpu-z","ssd-z","hwmonitor","crystaldiskmark","crystaldiskinfo")
    foreach ($item in $HWMon) {
    Install-ScoopApp -Package "$item"
    }
    $HWMon = @("ScooterSoftware.BeyondCompare4","Eassos.DiskGenius","Piriform.Speccy","Piriform.Defraggler")
    foreach ($item in $HWMon) {
    Install-WinGetApp -PackageID "$item"
    }

    # Install my PowerShell dot files
    Start-Process -FilePath "PowerShell" -ArgumentList "git","clone","https://github.com/mikepruett3/dotposh.git","$Env:UserProfile\dotposh" -Wait -NoNewWindow
    @'
    @@ -297,4 +348,5 @@ foreach ($item in $RemoveApps) {
    # Install Windows SubSystems for Linux
    Start-Process -FilePath "PowerShell" -ArgumentList "wsl","--install" -Verb RunAs -Wait -WindowStyle Hidden
    Install-WinGetApp -PackageID Canonical.Ubuntu.2004
    Write-Output "Install complete! Please reboot your machine/worksation!"
    Write-Output "Install complete! Please reboot your machine/worksation!"
    Start-Sleep -Seconds 3
  25. mikepruett3 revised this gist Apr 23, 2022. 1 changed file with 9 additions and 4 deletions.
    13 changes: 9 additions & 4 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -272,14 +272,19 @@ git submodule update
    Start-Process -FilePath "PowerShell" -ArgumentList "$Env:Temp\submodule.ps1" -Wait -NoNewWindow
    Remove-Item -Path $Env:Temp\submodule.ps1 -Force

    # Pin PowerShell to Taskbar
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:AppData\Microsoft\Windows\Start Menu\Programs\Windows PowerShell\Windows PowerShell.lnk'","c:5386" -Wait -NoNewWindow

    # Install PowerShell 7
    $PS7 = winget list --exact -q Microsoft.PowerShell
    if (!$PS7) {
    Write-Verbose -Message "Installing PowerShell 7..."
    @'
    iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -Quiet"
    '@ > $Env:Temp\ps7.ps1
    Start-Process -FilePath "PowerShell" -ArgumentList "$Env:Temp\ps7.ps1" -Verb RunAs -Wait -WindowStyle Hidden
    Remove-Item -Path $Env:Temp\ps7.ps1 -Force
    # Pin PowerShell to Taskbar
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:AppData\Microsoft\Windows\Start Menu\Programs\Windows PowerShell\Windows PowerShell.lnk'","c:5386" -Wait -NoNewWindow
    Start-Process -FilePath "PowerShell" -ArgumentList "$Env:Temp\ps7.ps1" -Verb RunAs -Wait -WindowStyle Hidden
    Remove-Item -Path $Env:Temp\ps7.ps1 -Force
    }
    # Pin PowerShell 7 to Taskbar
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:ProgramData\Microsoft\Windows\Start Menu\Programs\PowerShell\PowerShell 7 (x64).lnk'","c:5386" -Wait -NoNewWindow

  26. mikepruett3 revised this gist Apr 23, 2022. 1 changed file with 30 additions and 8 deletions.
    38 changes: 30 additions & 8 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -40,6 +40,28 @@ function Install-WinGetApp {
    }
    }

    function Install-ChocoApp {
    param (
    [string]$Package
    )
    Write-Verbose -Message "Preparing to install $Package"
    $listApp = choco list --local $Package
    if ($listApp -like "0 packages installed.") {
    Write-Verbose -Message "Installing $Package"
    Start-Process -FilePath "PowerShell" -ArgumentList "choco","install","$Package","-y" -Verb RunAs -Wait
    } else {
    Write-Verbose -Message "Package $Package already installed! Skipping..."
    }
    }

    function Remove-InstalledApp {
    param (
    [string]$Package
    )
    Write-Verbose -Message "Uninstalling: $Package"
    Start-Process -FilePath "PowerShell" -ArgumentList "Get-AppxPackage","-AllUsers","-Name","'$Package'" -Verb RunAs -WindowStyle Hidden
    }

    function Enable-Bucket {
    param (
    [string]$Bucket
    @@ -107,13 +129,6 @@ Add-AppxPackage -Path $latestRelease.browser_download_url
    Remove-Item -Path $Env:Temp\winget.ps1 -Force
    }

    # Remove unused Packages/Applications
    $RemoveApps = @("*3DPrint*","Microsoft.MixedReality.Portal")
    foreach ($item in $RemoveApps) {
    Write-Verbose -Message "Uninstalling: $item"
    Start-Process -FilePath "PowerShell" -ArgumentList "Get-AppxPackage","-AllUsers","$item","|","Remove-AppxPackage" -Verb RunAs -Wait -WindowStyle Hidden
    }

    # Configure git
    Install-ScoopApp -Package "git"
    git config --global credential.helper manager-core
    @@ -203,7 +218,8 @@ foreach ($item in $UsefullTools) {
    Install-WinGetApp -PackageID "$item"
    }
    # Install syspin
    Start-Process -FilePath "PowerShell" -ArgumentList "choco","install","syspin","-y" -Verb RunAs -Wait
    Install-ChocoApp -Package "syspin"
    #Start-Process -FilePath "PowerShell" -ArgumentList "choco","install","syspin","-y" -Verb RunAs -Wait
    # Pin Run to Taskbar
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:AppData\Microsoft\Windows\Start Menu\Programs\System Tools\Run.lnk'","c:5386" -Wait -NoNewWindow
    # Pin Google Chrome to Taskbar
    @@ -267,6 +283,12 @@ Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:AppData\Micro
    # Pin PowerShell 7 to Taskbar
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:ProgramData\Microsoft\Windows\Start Menu\Programs\PowerShell\PowerShell 7 (x64).lnk'","c:5386" -Wait -NoNewWindow

    # Remove unused Packages/Applications
    $RemoveApps = @("*3DPrint*","Microsoft.MixedReality.Portal")
    foreach ($item in $RemoveApps) {
    Remove-InstalledApp -Package $item
    }

    # Install Windows SubSystems for Linux
    Start-Process -FilePath "PowerShell" -ArgumentList "wsl","--install" -Verb RunAs -Wait -WindowStyle Hidden
    Install-WinGetApp -PackageID Canonical.Ubuntu.2004
  27. mikepruett3 revised this gist Apr 23, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -205,7 +205,7 @@ foreach ($item in $UsefullTools) {
    # Install syspin
    Start-Process -FilePath "PowerShell" -ArgumentList "choco","install","syspin","-y" -Verb RunAs -Wait
    # Pin Run to Taskbar
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:AppData\Microsoft\Windows\Start Menu\Programs\Windows System\Run.lnk'","c:5386" -Wait -NoNewWindow
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:AppData\Microsoft\Windows\Start Menu\Programs\System Tools\Run.lnk'","c:5386" -Wait -NoNewWindow
    # Pin Google Chrome to Taskbar
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:ProgramData\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk'","c:5386" -Wait -NoNewWindow

  28. mikepruett3 revised this gist Apr 23, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -203,7 +203,7 @@ foreach ($item in $UsefullTools) {
    Install-WinGetApp -PackageID "$item"
    }
    # Install syspin
    Start-Process -FilePath "PowerShell" -ArgumentList "choco","install","syspin","-y" -Wait -Verb Open
    Start-Process -FilePath "PowerShell" -ArgumentList "choco","install","syspin","-y" -Verb RunAs -Wait
    # Pin Run to Taskbar
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:AppData\Microsoft\Windows\Start Menu\Programs\Windows System\Run.lnk'","c:5386" -Wait -NoNewWindow
    # Pin Google Chrome to Taskbar
  29. mikepruett3 revised this gist Apr 23, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -203,7 +203,7 @@ foreach ($item in $UsefullTools) {
    Install-WinGetApp -PackageID "$item"
    }
    # Install syspin
    Start-Process -FilePath "PowerShell" -ArgumentList "choco","install","syspin","-y" -Wait -NoNewWindow
    Start-Process -FilePath "PowerShell" -ArgumentList "choco","install","syspin","-y" -Wait -Verb Open
    # Pin Run to Taskbar
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:AppData\Microsoft\Windows\Start Menu\Programs\Windows System\Run.lnk'","c:5386" -Wait -NoNewWindow
    # Pin Google Chrome to Taskbar
  30. mikepruett3 revised this gist Apr 23, 2022. 1 changed file with 9 additions and 14 deletions.
    23 changes: 9 additions & 14 deletions shell-setup.ps1
    Original file line number Diff line number Diff line change
    @@ -203,11 +203,11 @@ foreach ($item in $UsefullTools) {
    Install-WinGetApp -PackageID "$item"
    }
    # Install syspin
    choco install syspin -y
    Start-Process -FilePath "PowerShell" -ArgumentList "choco","install","syspin","-y" -Wait -NoNewWindow
    # Pin Run to Taskbar
    syspin "$Env:AppData\Microsoft\Windows\Start Menu\Programs\Windows System\Run.lnk" c:5386
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:AppData\Microsoft\Windows\Start Menu\Programs\Windows System\Run.lnk'","c:5386" -Wait -NoNewWindow
    # Pin Google Chrome to Taskbar
    syspin "$Env:ProgramData\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk" c:5386
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:ProgramData\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk'","c:5386" -Wait -NoNewWindow

    # Media Utilities
    $MediaUtils = @("ffmpeg","mpv","vlc","lame","musicbee","mp3tag","mkvtoolnix","obs-studio","yt-dlp","ocenaudio","mediainfo","mediainfo-gui","cdrtools","cuetools")
    @@ -240,37 +240,32 @@ foreach ($item in $HWMon) {
    }

    # Install my PowerShell dot files
    git clone https://github.com/mikepruett3/dotposh.git $Env:UserProfile\dotposh
    Start-Process -FilePath "PowerShell" -ArgumentList "git","clone","https://github.com/mikepruett3/dotposh.git","$Env:UserProfile\dotposh" -Wait -NoNewWindow
    @'
    New-Item -Path $Env:UserProfile\Documents\WindowsPowerShell -ItemType Directory -ErrorAction Ignore
    Remove-Item -Path $Env:UserProfile\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 -Force
    New-Item -Path $Env:UserProfile\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 -ItemType SymbolicLink -Target $Env:UserProfile\dotposh\profile.ps1
    '@ > $Env:Temp\dotposh.ps1
    Start-Process -FilePath "PowerShell" -ArgumentList "$Env:Temp\dotposh.ps1" -Verb RunAs -Wait #-WindowStyle Hidden
    Start-Process -FilePath "PowerShell" -ArgumentList "$Env:Temp\dotposh.ps1" -Verb RunAs -Wait -WindowStyle Hidden
    Remove-Item -Path $Env:Temp\dotposh.ps1 -Force
    @'
    cd $Env:UserProfile\dotposh
    git submodule init
    git submodule update
    '@ > $Env:Temp\submodule.ps1
    Start-Process -FilePath "PowerShell" -ArgumentList "$Env:Temp\submodule.ps1" -Wait #-WindowStyle Hidden
    Start-Process -FilePath "PowerShell" -ArgumentList "$Env:Temp\submodule.ps1" -Wait -NoNewWindow
    Remove-Item -Path $Env:Temp\submodule.ps1 -Force

    # Pin PowerShell to Taskbar
    $SHL = New-Object -COMObject Shell.Application
    $Program = $SHL.Namespace((Join-Path $env:SystemRoot System32\WindowsPowerShell\v1.0)).parsename('powershell.exe')
    $Program.invokeverb('taskbarpin')

    # Install PowerShell 7
    @'
    iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -Quiet"
    '@ > $Env:Temp\ps7.ps1
    Start-Process -FilePath "PowerShell" -ArgumentList "$Env:Temp\ps7.ps1" -Verb RunAs -Wait #-WindowStyle Hidden
    Start-Process -FilePath "PowerShell" -ArgumentList "$Env:Temp\ps7.ps1" -Verb RunAs -Wait -WindowStyle Hidden
    Remove-Item -Path $Env:Temp\ps7.ps1 -Force
    # Pin PowerShell to Taskbar
    syspin "$Env:AppData\Microsoft\Windows\Start Menu\Programs\Windows PowerShell\Windows PowerShell.lnk" c:5386
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:AppData\Microsoft\Windows\Start Menu\Programs\Windows PowerShell\Windows PowerShell.lnk'","c:5386" -Wait -NoNewWindow
    # Pin PowerShell 7 to Taskbar
    syspin "$Env:ProgramData\Microsoft\Windows\Start Menu\Programs\PowerShell\PowerShell 7 (x64).lnk" c:5386
    Start-Process -FilePath "PowerShell" -ArgumentList "syspin","'$Env:ProgramData\Microsoft\Windows\Start Menu\Programs\PowerShell\PowerShell 7 (x64).lnk'","c:5386" -Wait -NoNewWindow

    # Install Windows SubSystems for Linux
    Start-Process -FilePath "PowerShell" -ArgumentList "wsl","--install" -Verb RunAs -Wait -WindowStyle Hidden