Advertisement
PrinceOfCookies

Untitled

Jun 26th, 2025
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # install.ps1 - PC setup script
  2.  
  3. # --- Utility function to check for installed programs ---
  4. function Is-ProgramInstalled {
  5.     param ([string]$ProgramName)
  6.     Get-ItemProperty @(
  7.         'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*',
  8.         'HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'
  9.     ) | Where-Object { $_.DisplayName -like "*$ProgramName*" }
  10. }
  11.  
  12. # --- Helper function for EXE installs ---
  13. function Install-Executable {
  14.     param (
  15.         [string]$Name,
  16.         [string]$Url,
  17.         [string]$InstallerName,
  18.         [string]$Args = "/S"
  19.     )
  20.     if (-not (Is-ProgramInstalled $Name)) {
  21.         Write-Host "Installing $Name..."
  22.         $path = "$env:TEMP\$InstallerName"
  23.         Invoke-WebRequest -Uri $Url -OutFile $path
  24.         Start-Process -FilePath $path -ArgumentList $Args -Wait
  25.         Remove-Item $path
  26.     } else {
  27.         Write-Host "$Name is already installed."
  28.     }
  29. }
  30.  
  31. # --- Helper function for MSI installs ---
  32. function Install-MSI {
  33.     param (
  34.         [string]$Name,
  35.         [string]$Url,
  36.         [string]$InstallerName
  37.     )
  38.     if (-not (Is-ProgramInstalled $Name)) {
  39.         Write-Host "Installing $Name..."
  40.         $path = "$env:TEMP\$InstallerName"
  41.         Invoke-WebRequest -Uri $Url -OutFile $path
  42.         Start-Process -FilePath "msiexec.exe" -ArgumentList "/i `"$path`" /quiet" -Wait
  43.         Remove-Item $path
  44.     } else {
  45.         Write-Host "$Name is already installed."
  46.     }
  47. }
  48.  
  49. # --- Setup taskbar ---
  50. # --- Setup taskbar position and center icons ---
  51. function TaskbarSetup {
  52.     # Move taskbar to bottom
  53.     $regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3"
  54.     $data = (Get-ItemProperty -Path $regPath).Settings
  55.     $modified = $data.Clone()
  56.     $modified[12] = 0x03
  57.     Set-ItemProperty -Path $regPath -Name Settings -Value $modified
  58.  
  59.     # Search box style
  60.     Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "SearchboxTaskbarMode" -Value 1
  61.  
  62.     Stop-Process -Name explorer -Force
  63.     Start-Process explorer
  64. }
  65.  
  66.  
  67.  
  68. # --- Installations ---
  69. Install-Executable "Google Chrome" "https://dl.google.com/chrome/install/latest/chrome_installer.exe" "chrome_installer.exe" "/silent /install"
  70. Install-Executable "Discord" "https://discord.com/api/download?platform=win" "DiscordSetup.exe" "/silent /install"
  71. Install-Executable "Visual Studio Code" "https://code.visualstudio.com/sha/download?build=stable&os=win32-x64-user" "VSCodeSetup.exe" "/silent /install"
  72. Install-Executable "Steam" "https://cdn.cloudflare.steamstatic.com/client/installer/SteamSetup.exe" "SteamSetup.exe" "/silent /install"
  73. Install-Executable "WinRAR" "https://www.win-rar.com/fileadmin/winrar-versions/winrar/winrar-x64-711.exe" "WinRARSetup.exe" "/silent /install"
  74. Install-Executable "Beekeeper Studio" "https://github.com/beekeeper-studio/beekeeper-studio/releases/download/v5.1.5/Beekeeper-Studio-Setup-5.1.5.exe" "BeekeeperStudioSetup.exe" "/silent /install"
  75. Install-Executable "OBS Studio" "https://cdn-fastly.obsproject.com/downloads/OBS-Studio-31.0.2-Windows-Installer.exe" "OBSStudioSetup.exe" "/silent /install"
  76. Install-Executable "Lunar Client" "https://api.lunarclientprod.com/site/download?os=windows" "LunarClientSetup.exe" "/silent /install"
  77. Install-Executable "GDLauncher" "https://cdn-raw.gdl.gg/launcher/GDLauncher__2.0.24__win__x64.exe" "GDLauncherSetup.exe" "/silent /install"
  78. Install-Executable "Malwarebytes" "https://downloads.malwarebytes.com/file/mb-windows" "MalwarebytesSetup.exe" "/silent" "/install"
  79. Install-Executable "WinSCP" "https://cdn.winscp.net/files/WinSCP-6.5-Setup.exe?secure=JOL9DNmJGj-5COxTLRwgbw==,1746019823" "/silent" "/install"
  80. Install-MSI "Epic Games Launcher" "https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/installer/download/EpicGamesLauncherInstaller.msi" "EpicGamesLauncher.msi"
  81. Install-MSI "Node" "https://nodejs.org/dist/v22.15.0/node-v22.15.0-x64.msi" "node v22.15.0 x64.msi"
  82. # Taskbar
  83. TaskbarSetup
  84.  
  85. # WinDirStat via winget (uses its own package manager)
  86. if (-not (Is-ProgramInstalled "WinDirStat")) {
  87.     Write-Host "Installing WinDirStat..."
  88.     winget install -e --id WinDirStat.WinDirStat --silent
  89. } else {
  90.     Write-Host "WinDirStat is already installed."
  91. }
  92.  
  93. if (-not (Is-ProgramInstalled "git")) {
  94.     Write-Host "Instaling Git..."
  95.     winget install --id Git.Git -e --source winget
  96.  } else {
  97.     Write-Host "Git is already installed."
  98.  }
  99.  
  100.  
  101. # Vencord (no install check since it’s a mod)
  102. Write-Host "Installing Vencord..."
  103. $vcPath = "$env:TEMP\VencordInstaller.exe"
  104. Invoke-WebRequest -Uri "https://github.com/Vendicated/VencordInstaller/releases/latest/download/VencordInstaller.exe" -OutFile $vcPath
  105. Start-Process -FilePath $vcPath -Wait
  106. Remove-Item $vcPath
  107.  
  108. # Remove Edge
  109. if (Is-ProgramInstalled "Edge") {
  110.     Write-Host "Removing Edge..."
  111.     $edgeScript = "$env:TEMP\remove_edge.ps1"
  112.     Invoke-WebRequest -Uri "https://code.ravendevteam.org/talon/edge_vanisher.ps1" -OutFile $edgeScript
  113.     Start-Process -FilePath $edgeScript -Wait
  114.     Remove-Item $edgeScript
  115. } else {
  116.     Write-Host "Edge is already removed."
  117. }
  118.  
  119. Write-Host "All installations are complete."
  120.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement