diff --git a/config/applications.json b/config/applications.json index a49139d9..f8a3f395 100644 --- a/config/applications.json +++ b/config/applications.json @@ -95,14 +95,6 @@ "link": "https://www.audacityteam.org/", "winget": "Audacity.Audacity" }, - "WPFInstallauthy": { - "category": "Utilities", - "choco": "authy-desktop", - "content": "Authy", - "description": "Simple and cross-platform 2FA app", - "link": "https://authy.com/", - "winget": "Twilio.Authy" - }, "WPFInstallautoruns": { "category": "Microsoft Tools", "choco": "autoruns", @@ -1231,6 +1223,14 @@ "link": "https://mremoteng.org/", "winget": "mRemoteNG.mRemoteNG" }, + "WPFInstallmsedgeredirect": { + "category": "Utilities", + "choco": "msedgeredirect", + "content": "MSEdgeRedirect", + "description": "A Tool to Redirect News, Search, Widgets, Weather, and More to Your Default Browser.", + "link": "https://github.com/rcmaehl/MSEdgeRedirect", + "winget": "rcmaehl.MSEdgeRedirect" + }, "WPFInstallmsiafterburner": { "category": "Utilities", "choco": "msiafterburner", @@ -1279,6 +1279,14 @@ "link": "https://github.com/M2Team/NanaZip", "winget": "M2Team.NanaZip" }, + "WPFInstallnetbird": { + "category": "Pro Tools", + "choco": "netbird", + "content": "NetBird", + "description": "NetBird is a Open Source alternative comparable to TailScale that can be connected to a selfhosted Server.", + "link": "https://netbird.io/", + "winget": "netbird" + }, "WPFInstallnaps2": { "category": "Document", "choco": "naps2", @@ -1895,14 +1903,6 @@ "link": "https://starship.rs/", "winget": "starship" }, - "WPFInstallstartallback": { - "category": "Utilities", - "choco": "na", - "content": "StartAllBack", - "description": "StartAllBack is a Tool that can be used to edit the Windows appearance by your liking (Taskbar, Start Menu, File Explorer, Control Panel, Context Menu ...)", - "link": "https://www.startallback.com/", - "winget": "startallback" - }, "WPFInstallsteam": { "category": "Games", "choco": "steam-client", @@ -2311,14 +2311,6 @@ "link": "https://wezfurlong.org/wezterm/index.html", "winget": "wez.wezterm" }, - "WPFInstallwhatsapp": { - "category": "Communications", - "choco": "whatsapp", - "content": "Whatsapp", - "description": "WhatsApp Desktop is a desktop version of the popular messaging app, allowing users to send and receive messages, share files, and connect with contacts from their computer.", - "link": "https://www.whatsapp.com/", - "winget": "WhatsApp.WhatsApp" - }, "WPFInstallwindirstat": { "category": "Utilities", "choco": "windirstat", @@ -2638,5 +2630,13 @@ "description": "Fast Node Manager (fnm) allows you to switch your Node version by using the Terminal", "link": "https://github.com/Schniz/fnm", "winget": "Schniz.fnm" + }, + "WPFInstallWindhawk": { + "category": "Utilities", + "choco": "windhawk", + "content": "Windhawk", + "description": "The customization marketplace for Windows programs", + "link": "https://windhawk.net", + "winget": "RamenSoftware.Windhawk" } } diff --git a/config/tweaks.json b/config/tweaks.json index d1de827d..63e48bd3 100644 --- a/config/tweaks.json +++ b/config/tweaks.json @@ -77,6 +77,60 @@ } ] }, + "WPFTweaksAdobe": { + "Content": "Disable Adobe Services", + "Description": "Disables many of the services that come with Adobe and run in the background.", + "category": "Essential Tweaks", + "panel": "1", + "Order": "a009_", + "service": [ + { + "Name": "AGSService", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "AdobeUpdateService", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "Adobe Acrobat Update", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "Adobe Genuine Monitor Service", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "AdobeARMservice", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "Adobe Licensing Console", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "CCXProcess", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "AdobeIPCBroker", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "CoreSync", + "StartupType": "Manual", + "OriginalType": "Automatic" + } + ] + }, "WPFTweaksLoc": { "Content": "Disable Location Tracking", "Description": "Disables Location Tracking...DUH!", @@ -2323,6 +2377,25 @@ " ] }, + "WPFTweaksRemoveCopilot": { + "Content": "Disables Microsoft Copilot", + "Description": "Disables MS Copilot AI built into Windows since 23H2.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "Order": "a025_", + "InvokeScript": [ + " + Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name \"ShowCopilotButton\" -Type \"DWord\" -Value \"0\" + New-Item \"HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsCopilot\" -Force | New-ItemProperty -Name \"TurnOffWindowsCopilot\" -Value \"1\" -Force -Type \"DWord\" + " + ], + "UndoScript": [ + " + Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name \"ShowCopilotButton\" -Type \"DWord\" -Value \"1\" + Remove-Item \"HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsCopilot\" -Force + " + ] + }, "WPFTweaksRemoveOnedrive": { "Content": "Remove OneDrive", "Description": "Copies OneDrive files to Default Home Folders and Uninstalls it.", diff --git a/functions/private/Test-WinUtilPackageManager.ps1 b/functions/private/Test-WinUtilPackageManager.ps1 index ca269fc3..291616b2 100644 --- a/functions/private/Test-WinUtilPackageManager.ps1 +++ b/functions/private/Test-WinUtilPackageManager.ps1 @@ -20,13 +20,22 @@ function Test-WinUtilPackageManager { $status = "not-installed" if ($winget) { - # Install Winget if not detected - $wingetExists = Get-Command -Name winget -ErrorAction SilentlyContinue - - if ($wingetExists) { - # Check Winget Version - $wingetVersionFull = (winget --version) # Full Version without 'v'. + # Check if Winget is available while getting it's Version if it's available + $wingetExists = $true + try { + $wingetVersionFull = winget --version + } catch [System.Management.Automation.CommandNotFoundException], [System.Management.Automation.ApplicationFailedException] { + Write-Warning "Winget was not found due to un-availablity reasons" + $wingetExists = $false + } catch { + Write-Warning "Winget was not found due to un-known reasons, The Stack Trace is:`n$($psitem.Exception.StackTrace)" + $wingetExists = $false + } + # If Winget is available, Parse it's Version and give proper information to Terminal Output. + # If it isn't available, the return of this funtion will be "not-installed", indicating that + # Winget isn't installed/available on The System. + if ($wingetExists) { # Check if Preview Version if ($wingetVersionFull.Contains("-preview")) { $wingetVersion = $wingetVersionFull.Trim("-preview") diff --git a/functions/public/Invoke-WPFShortcut.ps1 b/functions/public/Invoke-WPFShortcut.ps1 index 4eab2dc6..f8ae04f9 100644 --- a/functions/public/Invoke-WPFShortcut.ps1 +++ b/functions/public/Invoke-WPFShortcut.ps1 @@ -17,27 +17,35 @@ function Invoke-WPFShortcut { [bool]$RunAsAdmin = $false ) - $iconPath = $null - Switch ($ShortcutToAdd) { - "WinUtil" { - $SourceExe = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe" - $IRM = 'irm https://christitus.com/win | iex' - $Powershell = '-ExecutionPolicy Bypass -Command "Start-Process powershell.exe -verb runas -ArgumentList' - $ArgumentsToSourceExe = "$powershell '$IRM'" - $DestinationName = "WinUtil.lnk" + # Preper the Shortcut Fields and add an a Custom Icon if it's available at "$env:TEMP\cttlogo.png", else don't add a Custom Icon. + $iconPath = $null + Switch ($ShortcutToAdd) { + "WinUtil" { + $SourceExe = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe" + $IRM = 'irm https://christitus.com/win | iex' + $Powershell = '-ExecutionPolicy Bypass -Command "Start-Process powershell.exe -verb runas -ArgumentList' + $ArgumentsToSourceExe = "$powershell '$IRM'" + $DestinationName = "WinUtil.lnk" - if (Test-Path -Path "$env:TEMP\cttlogo.png") { - $iconPath = "$env:SystempRoot\cttlogo.ico" - ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath $iconPath - } + if (Test-Path -Path "$env:TEMP\cttlogo.png") { + $iconPath = "$env:SystempRoot\cttlogo.ico" + ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath $iconPath } } + } + # Show a File Dialog Browser, to let the User choose the Name and Location of where to save the Shortcut $FileBrowser = New-Object System.Windows.Forms.SaveFileDialog $FileBrowser.InitialDirectory = [Environment]::GetFolderPath('Desktop') $FileBrowser.Filter = "Shortcut Files (*.lnk)|*.lnk" $FileBrowser.FileName = $DestinationName - $FileBrowser.ShowDialog() | Out-Null + + # Do an Early Return if The Save Shortcut operation was cancel by User's Input. + $FileBrowserResult = $FileBrowser.ShowDialog() + $DialogResultEnum = New-Object System.Windows.Forms.DialogResult + if (-not ($FileBrowserResult -eq $DialogResultEnum::OK)) { + return + } $WshShell = New-Object -comObject WScript.Shell $Shortcut = $WshShell.CreateShortcut($FileBrowser.FileName) @@ -56,4 +64,4 @@ function Invoke-WPFShortcut { } Write-Host "Shortcut for $ShortcutToAdd has been saved to $($FileBrowser.FileName) with 'Run as administrator' set to $RunAsAdmin" -} \ No newline at end of file +} diff --git a/winutil.ps1 b/winutil.ps1 index 4ab52398..73b70c6f 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -10,7 +10,7 @@ Author : Chris Titus @christitustech Runspace Author: @DeveloperDurp GitHub : https://github.com/ChrisTitusTech - Version : 24.04.25 + Version : 24.05.01 #> param ( [switch]$Debug, @@ -47,7 +47,7 @@ Add-Type -AssemblyName System.Windows.Forms # Variable to sync between runspaces $sync = [Hashtable]::Synchronized(@{}) $sync.PSScriptRoot = $PSScriptRoot -$sync.version = "24.04.25" +$sync.version = "24.05.01" $sync.configs = @{} $sync.ProcessRunning = $false @@ -2632,13 +2632,22 @@ function Test-WinUtilPackageManager { $status = "not-installed" if ($winget) { - # Install Winget if not detected - $wingetExists = Get-Command -Name winget -ErrorAction SilentlyContinue - - if ($wingetExists) { - # Check Winget Version - $wingetVersionFull = (winget --version) # Full Version without 'v'. + # Check if Winget is available while getting it's Version if it's available + $wingetExists = $true + try { + $wingetVersionFull = winget --version + } catch [System.Management.Automation.CommandNotFoundException], [System.Management.Automation.ApplicationFailedException] { + Write-Warning "Winget was not found due to un-availablity reasons" + $wingetExists = $false + } catch { + Write-Warning "Winget was not found due to un-known reasons, The Stack Trace is:`n$($psitem.Exception.StackTrace)" + $wingetExists = $false + } + # If Winget is available, Parse it's Version and give proper information to Terminal Output. + # If it isn't available, the return of this funtion will be "not-installed", indicating that + # Winget isn't installed/available on The System. + if ($wingetExists) { # Check if Preview Version if ($wingetVersionFull.Contains("-preview")) { $wingetVersion = $wingetVersionFull.Trim("-preview") @@ -4342,27 +4351,35 @@ function Invoke-WPFShortcut { [bool]$RunAsAdmin = $false ) - $iconPath = $null - Switch ($ShortcutToAdd) { - "WinUtil" { - $SourceExe = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe" - $IRM = 'irm https://christitus.com/win | iex' - $Powershell = '-ExecutionPolicy Bypass -Command "Start-Process powershell.exe -verb runas -ArgumentList' - $ArgumentsToSourceExe = "$powershell '$IRM'" - $DestinationName = "WinUtil.lnk" + # Preper the Shortcut Fields and add an a Custom Icon if it's available at "$env:TEMP\cttlogo.png", else don't add a Custom Icon. + $iconPath = $null + Switch ($ShortcutToAdd) { + "WinUtil" { + $SourceExe = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe" + $IRM = 'irm https://christitus.com/win | iex' + $Powershell = '-ExecutionPolicy Bypass -Command "Start-Process powershell.exe -verb runas -ArgumentList' + $ArgumentsToSourceExe = "$powershell '$IRM'" + $DestinationName = "WinUtil.lnk" - if (Test-Path -Path "$env:TEMP\cttlogo.png") { - $iconPath = "$env:SystempRoot\cttlogo.ico" - ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath $iconPath - } + if (Test-Path -Path "$env:TEMP\cttlogo.png") { + $iconPath = "$env:SystempRoot\cttlogo.ico" + ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath $iconPath } } + } + # Show a File Dialog Browser, to let the User choose the Name and Location of where to save the Shortcut $FileBrowser = New-Object System.Windows.Forms.SaveFileDialog $FileBrowser.InitialDirectory = [Environment]::GetFolderPath('Desktop') $FileBrowser.Filter = "Shortcut Files (*.lnk)|*.lnk" $FileBrowser.FileName = $DestinationName - $FileBrowser.ShowDialog() | Out-Null + + # Do an Early Return if The Save Shortcut operation was cancel by User's Input. + $FileBrowserResult = $FileBrowser.ShowDialog() + $DialogResultEnum = New-Object System.Windows.Forms.DialogResult + if (-not ($FileBrowserResult -eq $DialogResultEnum::OK)) { + return + } $WshShell = New-Object -comObject WScript.Shell $Shortcut = $WshShell.CreateShortcut($FileBrowser.FileName) @@ -5058,14 +5075,6 @@ $sync.configs.applications = '{ "link": "https://www.audacityteam.org/", "winget": "Audacity.Audacity" }, - "WPFInstallauthy": { - "category": "Utilities", - "choco": "authy-desktop", - "content": "Authy", - "description": "Simple and cross-platform 2FA app", - "link": "https://authy.com/", - "winget": "Twilio.Authy" - }, "WPFInstallautoruns": { "category": "Microsoft Tools", "choco": "autoruns", @@ -6194,6 +6203,14 @@ $sync.configs.applications = '{ "link": "https://mremoteng.org/", "winget": "mRemoteNG.mRemoteNG" }, + "WPFInstallmsedgeredirect": { + "category": "Utilities", + "choco": "msedgeredirect", + "content": "MSEdgeRedirect", + "description": "A Tool to Redirect News, Search, Widgets, Weather, and More to Your Default Browser.", + "link": "https://github.com/rcmaehl/MSEdgeRedirect", + "winget": "rcmaehl.MSEdgeRedirect" + }, "WPFInstallmsiafterburner": { "category": "Utilities", "choco": "msiafterburner", @@ -6242,6 +6259,14 @@ $sync.configs.applications = '{ "link": "https://github.com/M2Team/NanaZip", "winget": "M2Team.NanaZip" }, + "WPFInstallnetbird": { + "category": "Pro Tools", + "choco": "netbird", + "content": "NetBird", + "description": "NetBird is a Open Source alternative comparable to TailScale that can be connected to a selfhosted Server.", + "link": "https://netbird.io/", + "winget": "netbird" + }, "WPFInstallnaps2": { "category": "Document", "choco": "naps2", @@ -6858,14 +6883,6 @@ $sync.configs.applications = '{ "link": "https://starship.rs/", "winget": "starship" }, - "WPFInstallstartallback": { - "category": "Utilities", - "choco": "na", - "content": "StartAllBack", - "description": "StartAllBack is a Tool that can be used to edit the Windows appearance by your liking (Taskbar, Start Menu, File Explorer, Control Panel, Context Menu ...)", - "link": "https://www.startallback.com/", - "winget": "startallback" - }, "WPFInstallsteam": { "category": "Games", "choco": "steam-client", @@ -7274,14 +7291,6 @@ $sync.configs.applications = '{ "link": "https://wezfurlong.org/wezterm/index.html", "winget": "wez.wezterm" }, - "WPFInstallwhatsapp": { - "category": "Communications", - "choco": "whatsapp", - "content": "Whatsapp", - "description": "WhatsApp Desktop is a desktop version of the popular messaging app, allowing users to send and receive messages, share files, and connect with contacts from their computer.", - "link": "https://www.whatsapp.com/", - "winget": "WhatsApp.WhatsApp" - }, "WPFInstallwindirstat": { "category": "Utilities", "choco": "windirstat", @@ -7601,6 +7610,14 @@ $sync.configs.applications = '{ "description": "Fast Node Manager (fnm) allows you to switch your Node version by using the Terminal", "link": "https://github.com/Schniz/fnm", "winget": "Schniz.fnm" + }, + "WPFInstallWindhawk": { + "category": "Utilities", + "choco": "windhawk", + "content": "Windhawk", + "description": "The customization marketplace for Windows programs", + "link": "https://windhawk.net", + "winget": "RamenSoftware.Windhawk" } }' | convertfrom-json $sync.configs.dns = '{ @@ -8100,6 +8117,60 @@ $sync.configs.tweaks = '{ } ] }, + "WPFTweaksAdobe": { + "Content": "Disable Adobe Services", + "Description": "Disables many of the services that come with Adobe and run in the background.", + "category": "Essential Tweaks", + "panel": "1", + "Order": "a009_", + "service": [ + { + "Name": "AGSService", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "AdobeUpdateService", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "Adobe Acrobat Update", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "Adobe Genuine Monitor Service", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "AdobeARMservice", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "Adobe Licensing Console", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "CCXProcess", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "AdobeIPCBroker", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "CoreSync", + "StartupType": "Manual", + "OriginalType": "Automatic" + } + ] + }, "WPFTweaksLoc": { "Content": "Disable Location Tracking", "Description": "Disables Location Tracking...DUH!", @@ -10346,6 +10417,25 @@ $sync.configs.tweaks = '{ " ] }, + "WPFTweaksRemoveCopilot": { + "Content": "Disables Microsoft Copilot", + "Description": "Disables MS Copilot AI built into Windows since 23H2.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "Order": "a025_", + "InvokeScript": [ + " + Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name \"ShowCopilotButton\" -Type \"DWord\" -Value \"0\" + New-Item \"HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsCopilot\" -Force | New-ItemProperty -Name \"TurnOffWindowsCopilot\" -Value \"1\" -Force -Type \"DWord\" + " + ], + "UndoScript": [ + " + Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name \"ShowCopilotButton\" -Type \"DWord\" -Value \"1\" + Remove-Item \"HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsCopilot\" -Force + " + ] + }, "WPFTweaksRemoveOnedrive": { "Content": "Remove OneDrive", "Description": "Copies OneDrive files to Default Home Folders and Uninstalls it.", @@ -11566,9 +11656,6 @@ $inputXML = ' - - - @@ -11650,15 +11737,15 @@ $inputXML = ' + + + - - - @@ -11852,15 +11939,15 @@ $inputXML = ' + + + - - - @@ -12060,15 +12147,15 @@ $inputXML = ' + + + - - - @@ -12091,6 +12178,9 @@ $inputXML = ' + + + @@ -12137,9 +12227,6 @@ $inputXML = ' - - - @@ -12262,15 +12349,15 @@ $inputXML = ' + + + - - - @@ -12295,6 +12382,9 @@ $inputXML = ' + + + @@ -12385,9 +12475,6 @@ $inputXML = ' - - - @@ -12430,6 +12517,9 @@ $inputXML = ' + + + @@ -12505,6 +12595,7 @@ $inputXML = ' + @@ -12516,6 +12607,7 @@ $inputXML = ' + diff --git a/xaml/inputApp.xaml b/xaml/inputApp.xaml index fd630022..9acce14d 100644 --- a/xaml/inputApp.xaml +++ b/xaml/inputApp.xaml @@ -121,9 +121,6 @@ - - - @@ -205,15 +202,15 @@ + + + - - - @@ -407,15 +404,15 @@ + + + - - - @@ -615,15 +612,15 @@ + + + - - - @@ -646,6 +643,9 @@ + + + @@ -692,9 +692,6 @@ - - - @@ -817,15 +814,15 @@ + + + - - - @@ -850,6 +847,9 @@ + + + @@ -940,9 +940,6 @@ - - - @@ -985,6 +982,9 @@ + + + diff --git a/xaml/inputTweaks.xaml b/xaml/inputTweaks.xaml index db7e918e..717b3724 100644 --- a/xaml/inputTweaks.xaml +++ b/xaml/inputTweaks.xaml @@ -14,6 +14,7 @@ + @@ -25,6 +26,7 @@ +