commit 9eb0e23084e0049580550fe3774d2ed8ff87de56 Author: Kurtis Date: Wed Oct 29 00:38:45 2025 +1000 Initial Commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..2cc64d4 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# Windows 11 Scripts + +## Onboarding +This is a script that simply runs updates and installs basic software for a runup. +``` +powershell -ExecutionPolicy Bypass -c "irm "https://git.tcmeta.net/kurtis/win11-scripts/raw/branch/main/onboard.ps1" | iex" +``` + +## VargScript +This is a script that isntalls and customises windows 11 to how i like it. +``` +powershell -ExecutionPolicy Bypass -c "irm "https://git.tcmeta.net/kurtis/win11-scripts/raw/branch/main/vargscript.ps1" | iex" +``` diff --git a/onboard.ps1 b/onboard.ps1 new file mode 100644 index 0000000..81d9594 --- /dev/null +++ b/onboard.ps1 @@ -0,0 +1,112 @@ +# Check if the script is running as administrator +If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { + # If not running as administrator, attempt to restart with elevation + Write-Host "This script needs to run with Administrator privileges. Please Run again" + Exit +} + +function Install-Updates { + Install-Module PSWindowsUpdate + Import-Module PSWindowsUpdate + Get-WindowsUpdate + Install-WindowsUpdate +} + +function Install-ScreenBox { + Write-Host "Installing ScreenBox" + winget install 9NTSNMSVCB5L +} + +function Install-Qview { + Write-Host "Installing qView" + winget install jurplel.qView +} + +function Install-OnlyOffice { + Write-Host "Installing OnlyOffice" + winget install ONLYOFFICE.DesktopEditors +} + +function Install-Thunderbird { + Write-Host "Installing Thunderbird" + winget install Mozilla.Thunderbird +} + +function Install-Software { + Install-ScreenBox + Install-Qview + Install-OnlyOffice + Install-Thunderbird +} + +function Install-Software-NoOffice { + Install-ScreenBox + Install-Qview +} + +function Show-InteractiveMenu { + param ( + [string]$Title = "Main Menu", + [array]$Options + ) + + Clear-Host + Write-Host "================ $Title ================" + + for ($i = 0; $i -lt $Options.Count; $i++) { + Write-Host "$($i + 1): $($Options[$i])" + } + Write-Host "Q: Quit" + Write-Host "========================================" +} + +$menuOptions = @( + "Run All", + "Run All (No OnlyOffice or Thunderbird)" + "Windows Updates", + "Install Software", + "Install Software (No OnlyOffice or Thunderbird)" +) + +do { + Show-InteractiveMenu -Title "Onboarding Script" -Options $menuOptions + $choice = Read-Host "Enter your choice (1- $($menuOptions.Count), or Q to quit)" + + switch ($choice) { + "1" { + Install-Updates + Install-Software + Write-Head "All Done!" + Pause + } + "2" { + Install-Updates + Install-Software-NoOffice + Pause + } + "3" { + Install-Updates + Pause + } + "4" { + Install-Software + Pause + } + "5" { + Install-Software-NoOffice + Pause + } + "q" { + Write-Host "Exiting menu." + break + } + "Q" { + Write-Host "Exiting menu." + break + } + default { + Write-Host "Invalid choice. Please try again." -ForegroundColor Red + Pause + } + } +} while ($choice -ne "q" -and $choice -ne "Q") \ No newline at end of file diff --git a/vargscript.ps1 b/vargscript.ps1 new file mode 100644 index 0000000..0fa9ecc --- /dev/null +++ b/vargscript.ps1 @@ -0,0 +1,148 @@ +# Check if the script is running as administrator +If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { + # If not running as administrator, attempt to restart with elevation + Write-Host "This script needs to run with Administrator privileges. Please Run again" + Exit +} + +function Install-Zen { + Write-Head "Installing Zen" + winget install Zen-Team.Zen-Browser +} + +function Config-Zen { + Write-Host "Creating Directory" + $folderPath = "C:\Program Files\Zen Browser\distribution" + if (-not (Test-Path $folderPath -PathType Container)) { + New-Item -Path $folderPath -ItemType Directory -Force + Write-Host "Folder '$folderPath' created successfully." + } else { + Write-Host "Folder '$folderPath' already exists." + } + Write-Host "Downloading Policy" + $download = "https://git.tcmeta.net/kurtis/win11-scripts/raw/branch/main/vargscript/zen-policy.json" + Invoke-WebRequest $download -Out "$folderPath\policy.json" +} + +function Install-FlowLauncher { + Write-Head "Installing Flow Launcher" + winget install Flow-Launcher.Flow-Launcher +} + +function Config-FlowLauncher { + $folderPath = "$ENV:APPDATA\FlowLauncher\Themes" + if (-not (Test-Path $folderPath -PathType Container)) { + New-Item -Path $folderPath -ItemType Directory -Force + Write-Host "Folder '$folderPath' created successfully." + } else { + Write-Host "Folder '$folderPath' already exists." + } + Write-Host "Downloading Theme" + $download = "https://git.tcmeta.net/kurtis/win11-scripts/raw/branch/main/vargscript/flow-95theme.xaml" + Invoke-WebRequest $download -Out "$folderPath\Windows 95.xaml" +} + +function Install-NextCloud { + Write-Head "Installing Nextcloud" + winget install Nextcloud.NextcloudDesktop +} + +function Install-SteamLink { + Write-Head "Installing Steamlink" + winget install Valve.SteamLink +} + +function Install-Clink { + Write-Head "Installing Clink" + winget install chrisant996.Clink +} + +function Install-Starship { + Write-Head "running Nerdfont installer" + & ([scriptblock]::Create((iwr 'https://to.loredo.me/Install-NerdFont.ps1'))) + winget install Starship.Starship + Write-Head "Configuring CMD" + $folderPath = "$ENV:APPDATALOCAL\clink" + if (-not (Test-Path $folderPath -PathType Container)) { + New-Item -Path $folderPath -ItemType Directory -Force + Write-Host "Folder '$folderPath' created successfully." + } else { + Write-Host "Folder '$folderPath' already exists." + } + Set-Content -Path "$folderPath\starship.lua" -Value "load(io.popen('starship init cmd'):read(`"*a`"))()" + Write-Head "Configuring PowerShell" + $folderPath = "$([Environment]::GetFolderPath("MyDocuments"))\WindowsPowerShell" + if (-not (Test-Path $folderPath -PathType Container)) { + New-Item -Path $folderPath -ItemType Directory -Force + Write-Host "Folder '$folderPath' created successfully." + } else { + Write-Host "Folder '$folderPath' already exists." + } + Add-Content -Path "$folderPath\Microsoft.PowerShell_profile.ps1" -Value "Invoke-Expression (&starship init powershell)" +} + + + +function Show-InteractiveMenu { + param ( + [string]$Title = "Main Menu", + [array]$Options + ) + + Clear-Host + Write-Host "================ $Title ================" + + for ($i = 0; $i -lt $Options.Count; $i++) { + Write-Host "$($i + 1): $($Options[$i])" + } + Write-Host "Q: Quit" + Write-Host "========================================" +} + +$menuOptions = @( + "Run All", + "Install Zen Config", + "Install FlowLauncher Theme", + "Install Terminal Settings" +) + +do { + Show-InteractiveMenu -Title "Onboarding Script" -Options $menuOptions + $choice = Read-Host "Enter your choice (1- $($menuOptions.Count), or Q to quit)" + + switch ($choice) { + "1" { + Install-Zen + Config-Zen + Install-FlowLauncher + Config-FlowLauncher + Install-NextCloud + Install-SteamLink + Install-Clink + Install-Starship + + Pause + } + "2" { + Pause + } + "3" { + Pause + } + "4" { + Pause + } + "q" { + Write-Host "Exiting menu." + break + } + "Q" { + Write-Host "Exiting menu." + break + } + default { + Write-Host "Invalid choice. Please try again." -ForegroundColor Red + Pause + } + } +} while ($choice -ne "q" -and $choice -ne "Q") \ No newline at end of file diff --git a/vargscript/flow-95theme.xaml b/vargscript/flow-95theme.xaml new file mode 100644 index 0000000..15bc638 --- /dev/null +++ b/vargscript/flow-95theme.xaml @@ -0,0 +1,274 @@ + + + + + + + + + + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + #FF000082 + 0 + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vargscript/zen-policy.json b/vargscript/zen-policy.json new file mode 100644 index 0000000..53f40f1 --- /dev/null +++ b/vargscript/zen-policy.json @@ -0,0 +1,12 @@ +{ + "policies": { + "Extensions": { + "Install": [ + "https://addons.mozilla.org/firefox/downloads/file/4412673/ublock_origin-1.62.0.xpi", + "https://addons.mozilla.org/firefox/downloads/file/4410896/bitwarden_password_manager-2024.12.4.xpi", + "https://addons.mozilla.org/firefox/downloads/file/4461264/hoarder_app-1.2.0.xpi" + ] + }, + "PasswordManagerEnabled": false + } +} \ No newline at end of file