Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # install.ps1 - PC setup script
- # --- Utility function to check for installed programs ---
- function Is-ProgramInstalled {
- param ([string]$ProgramName)
- Get-ItemProperty @(
- 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*',
- 'HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'
- ) | Where-Object { $_.DisplayName -like "*$ProgramName*" }
- }
- # --- Helper function for EXE installs ---
- function Install-Executable {
- param (
- [string]$Name,
- [string]$Url,
- [string]$InstallerName,
- [string]$Args = "/S"
- )
- if (-not (Is-ProgramInstalled $Name)) {
- Write-Host "Installing $Name..."
- $path = "$env:TEMP\$InstallerName"
- Invoke-WebRequest -Uri $Url -OutFile $path
- Start-Process -FilePath $path -ArgumentList $Args -Wait
- Remove-Item $path
- } else {
- Write-Host "$Name is already installed."
- }
- }
- # --- Helper function for MSI installs ---
- function Install-MSI {
- param (
- [string]$Name,
- [string]$Url,
- [string]$InstallerName
- )
- if (-not (Is-ProgramInstalled $Name)) {
- Write-Host "Installing $Name..."
- $path = "$env:TEMP\$InstallerName"
- Invoke-WebRequest -Uri $Url -OutFile $path
- Start-Process -FilePath "msiexec.exe" -ArgumentList "/i `"$path`" /quiet" -Wait
- Remove-Item $path
- } else {
- Write-Host "$Name is already installed."
- }
- }
- # --- Setup taskbar ---
- # --- Setup taskbar position and center icons ---
- function TaskbarSetup {
- # Move taskbar to bottom
- $regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3"
- $data = (Get-ItemProperty -Path $regPath).Settings
- $modified = $data.Clone()
- $modified[12] = 0x03
- Set-ItemProperty -Path $regPath -Name Settings -Value $modified
- # Search box style
- Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "SearchboxTaskbarMode" -Value 1
- Stop-Process -Name explorer -Force
- Start-Process explorer
- }
- # --- Installations ---
- Install-Executable "Google Chrome" "https://dl.google.com/chrome/install/latest/chrome_installer.exe" "chrome_installer.exe" "/silent /install"
- Install-Executable "Discord" "https://discord.com/api/download?platform=win" "DiscordSetup.exe" "/silent /install"
- Install-Executable "Visual Studio Code" "https://code.visualstudio.com/sha/download?build=stable&os=win32-x64-user" "VSCodeSetup.exe" "/silent /install"
- Install-Executable "Steam" "https://cdn.cloudflare.steamstatic.com/client/installer/SteamSetup.exe" "SteamSetup.exe" "/silent /install"
- Install-Executable "WinRAR" "https://www.win-rar.com/fileadmin/winrar-versions/winrar/winrar-x64-711.exe" "WinRARSetup.exe" "/silent /install"
- 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"
- Install-Executable "OBS Studio" "https://cdn-fastly.obsproject.com/downloads/OBS-Studio-31.0.2-Windows-Installer.exe" "OBSStudioSetup.exe" "/silent /install"
- Install-Executable "Lunar Client" "https://api.lunarclientprod.com/site/download?os=windows" "LunarClientSetup.exe" "/silent /install"
- Install-Executable "GDLauncher" "https://cdn-raw.gdl.gg/launcher/GDLauncher__2.0.24__win__x64.exe" "GDLauncherSetup.exe" "/silent /install"
- Install-Executable "Malwarebytes" "https://downloads.malwarebytes.com/file/mb-windows" "MalwarebytesSetup.exe" "/silent" "/install"
- Install-Executable "WinSCP" "https://cdn.winscp.net/files/WinSCP-6.5-Setup.exe?secure=JOL9DNmJGj-5COxTLRwgbw==,1746019823" "/silent" "/install"
- Install-MSI "Epic Games Launcher" "https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/installer/download/EpicGamesLauncherInstaller.msi" "EpicGamesLauncher.msi"
- Install-MSI "Node" "https://nodejs.org/dist/v22.15.0/node-v22.15.0-x64.msi" "node v22.15.0 x64.msi"
- # Taskbar
- TaskbarSetup
- # WinDirStat via winget (uses its own package manager)
- if (-not (Is-ProgramInstalled "WinDirStat")) {
- Write-Host "Installing WinDirStat..."
- winget install -e --id WinDirStat.WinDirStat --silent
- } else {
- Write-Host "WinDirStat is already installed."
- }
- if (-not (Is-ProgramInstalled "git")) {
- Write-Host "Instaling Git..."
- winget install --id Git.Git -e --source winget
- } else {
- Write-Host "Git is already installed."
- }
- # Vencord (no install check since it’s a mod)
- Write-Host "Installing Vencord..."
- $vcPath = "$env:TEMP\VencordInstaller.exe"
- Invoke-WebRequest -Uri "https://github.com/Vendicated/VencordInstaller/releases/latest/download/VencordInstaller.exe" -OutFile $vcPath
- Start-Process -FilePath $vcPath -Wait
- Remove-Item $vcPath
- # Remove Edge
- if (Is-ProgramInstalled "Edge") {
- Write-Host "Removing Edge..."
- $edgeScript = "$env:TEMP\remove_edge.ps1"
- Invoke-WebRequest -Uri "https://code.ravendevteam.org/talon/edge_vanisher.ps1" -OutFile $edgeScript
- Start-Process -FilePath $edgeScript -Wait
- Remove-Item $edgeScript
- } else {
- Write-Host "Edge is already removed."
- }
- Write-Host "All installations are complete."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement