diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index c6449f80..8e8896ca 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -4,6 +4,28 @@ on:
push:
jobs:
+ test:
+ runs-on: windows-latest
+ steps:
+ - name: Check out repository code
+ uses: actions/checkout@v3
+ with:
+ ref: ${{ github.head_ref }}
+ - name: pester_tests
+ id: pester_tests
+ uses: zyborg/pester-tests-report@v1
+ with:
+ include_paths: pester
+ report_name: Winutil_Tests
+ report_title: Winutil_Tests
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ tests_fail_step: true
+ - name: dump test results
+ shell: pwsh
+ run: |
+ Write-Host 'Total Tests Executed...: ${{ steps.pester_tests.outputs.total_count }}'
+ Write-Host 'Total Tests PASSED.....: ${{ steps.pester_tests.outputs.passed_count }}'
+ Write-Host 'Total Tests FAILED.....: ${{ steps.pester_tests.outputs.failed_count }}'
build:
runs-on: ubuntu-latest
steps:
@@ -13,9 +35,9 @@ jobs:
- name: Create local changes
run: |
sed -i "/\$BranchToUse = /c\$BranchToUse = '$GITHUB_REF_NAME'" $GITHUB_WORKSPACE/runspace.ps1
- cat $GITHUB_WORKSPACE/runspace.ps1
- sed -i "/\$BranchToUse = /c\$BranchToUse = '$GITHUB_REF_NAME'" $GITHUB_WORKSPACE/runspace.ps1
- cat $GITHUB_WORKSPACE/winutil.ps1
+ grep "\$BranchToUse =" $GITHUB_WORKSPACE/runspace.ps1
+ sed -i "/\$BranchToUse = /c\$BranchToUse = '$GITHUB_REF_NAME'" $GITHUB_WORKSPACE/winutil.ps1
+ grep "\$BranchToUse =" $GITHUB_WORKSPACE/winutil.ps1
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update Branch in script
diff --git a/MainWindow-runspace.xaml b/MainWindow-runspace.xaml
index 9799909c..9f819aed 100644
--- a/MainWindow-runspace.xaml
+++ b/MainWindow-runspace.xaml
@@ -236,6 +236,8 @@
+
+
diff --git a/MainWindow.xaml b/MainWindow.xaml
index 9ba40422..c921af22 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -6,298 +6,316 @@
xmlns:local="clr-namespace:WinUtility"
mc:Ignorable="d"
Background="#777777"
- WindowStartupLocation="CenterScreen"
+ WindowStartupLocation="CenterScreen"
Title="Chris Titus Tech's Windows Utility" Height="800" Width="1200">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Note: Hover over items to get a better description. Please be careful as many of these tweaks will heavily modify your system.
+ Recommended selections are for normal users and if you are unsure do NOT check anything else!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This is the default settings that come with Windows. No modifications are made and will remove any custom windows update settings.Note: If you still encounter update errors, reset all updates in the config tab. That will restore ALL Microsoft Update Services from their servers and reinstall them to default settings.
+
+
+
+ This is my recommended setting I use on all computers. It will delay feature updates by 2 years and will install security updates 4 days after release.Feature Updates: Adds features and often bugs to systems when they are released. You want to delay these as long as possible.Security Updates: Typically these are pressing security flaws that need to be patched quickly. You only want to delay these a couple of days just to see if they are safe and don't break other systems. You don't want to go without these for ANY extended periods of time.
+
+
+
+ This completely disables ALL Windows Updates and is NOT RECOMMENDED. However, it can be suitable if you use your system for a select purpose and do not actively browse the internet. Note: Your system will be easier to hack and infect without security updates.
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Note: Hover over items to get a better description. Please be careful as many of these tweaks will heavily modify your system.
- Recommended selections are for normal users and if you are unsure do NOT check anything else!
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- This is the default settings that come with Windows. No modifications are made and will remove any custom windows update settings.Note: If you still encounter update errors, reset all updates in the config tab. That will restore ALL Microsoft Update Services from their servers and reinstall them to default settings.
-
-
-
- This is my recommended setting I use on all computers. It will delay feature updates by 2 years and will install security updates 4 days after release.Feature Updates: Adds features and often bugs to systems when they are released. You want to delay these as long as possible.Security Updates: Typically these are pressing security flaws that need to be patched quickly. You only want to delay these a couple of days just to see if they are safe and don't break other systems. You don't want to go without these for ANY extended periods of time.
-
-
-
- This completely disables ALL Windows Updates and is NOT RECOMMENDED. However, it can be suitable if you use your system for a select purpose and do not actively browse the internet. Note: Your system will be easier to hack and infect without security updates.
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/config/applications.json b/config/applications.json
index 720b5d66..56456f68 100644
--- a/config/applications.json
+++ b/config/applications.json
@@ -1,322 +1,382 @@
{
- "install": {
- "Installadobe": {
+ "Install": {
+ "WPFInstalladobe": {
"winget": "Adobe.Acrobat.Reader.64-bit"
},
- "Installadvancedip": {
+ "WPFInstalladvancedip": {
"winget": "Famatech.AdvancedIPScanner"
},
- "Installanydesk": {
+ "WPFInstallanydesk": {
"winget": "AnyDeskSoftwareGmbH.AnyDesk"
},
- "Installatom": {
+ "WPFInstallatom": {
"winget": "GitHub.Atom"
},
- "Installaudacity": {
+ "WPFInstallaudacity": {
"winget": "Audacity.Audacity"
},
- "Installautohotkey": {
+ "WPFInstallautohotkey": {
"winget": "Lexikos.AutoHotkey"
},
- "Installbitwarden": {
+ "WPFInstallbitwarden": {
"winget": "Bitwarden.Bitwarden"
},
- "Installblender": {
+ "WPFInstallblender": {
"winget": "BlenderFoundation.Blender"
},
- "Installbrave": {
+ "WPFInstallbrave": {
"winget": "Brave.Brave"
},
- "Installchrome": {
+ "WPFInstallchrome": {
"winget": "Google.Chrome"
},
- "Installchromium": {
+ "WPFInstallchromium": {
"winget": "eloston.ungoogled-chromium"
},
- "Installcpuz": {
+ "WPFInstallcpuz": {
"winget": "CPUID.CPU-Z"
},
- "Installdiscord": {
+ "WPFInstalldiscord": {
"winget": "Discord.Discord"
},
- "Installeartrumpet": {
+ "WPFInstalleartrumpet": {
"winget": "File-New-Project.EarTrumpet"
},
- "Installepicgames": {
+ "WPFInstallepicgames": {
"winget": "EpicGames.EpicGamesLauncher"
},
- "Installesearch": {
+ "WPFInstallesearch": {
"winget": "voidtools.Everything"
},
- "Installetcher": {
+ "WPFInstalletcher": {
"winget": "Balena.Etcher"
},
- "Installfirefox": {
+ "WPFInstallfirefox": {
"winget": "Mozilla.Firefox"
},
- "Installflameshot": {
+ "WPFInstallflameshot": {
"winget": "Flameshot.Flameshot"
},
- "Installfoobar": {
+ "WPFInstallfoobar": {
"winget": "PeterPawlowski.foobar2000"
},
- "Installgimp": {
+ "WPFInstallgimp": {
"winget": "GIMP.GIMP"
},
- "Installgithubdesktop": {
+ "WPFInstallgithubdesktop": {
"winget": "Git.Git;GitHub.GitHubDesktop"
},
- "Installgog": {
+ "WPFInstallgog": {
"winget": "GOG.Galaxy"
},
- "Installgpuz": {
+ "WPFInstallgpuz": {
"winget": "TechPowerUp.GPU-Z"
},
- "Installgreenshot": {
+ "WPFInstallgreenshot": {
"winget": "Greenshot.Greenshot"
},
- "Installhandbrake": {
+ "WPFInstallhandbrake": {
"winget": "HandBrake.HandBrake"
},
- "Installhexchat": {
+ "WPFInstallhexchat": {
"winget": "HexChat.HexChat"
},
- "Installhwinfo": {
+ "WPFInstallhwinfo": {
"winget": "REALiX.HWiNFO"
},
- "Installimageglass": {
+ "WPFInstallimageglass": {
"winget": "DuongDieuPhap.ImageGlass"
},
- "Installinkscape": {
+ "WPFInstallinkscape": {
"winget": "Inkscape.Inkscape"
},
- "Installjava16": {
+ "WPFInstalljava16": {
"winget": "AdoptOpenJDK.OpenJDK.16"
},
- "Installjava18": {
- "winget": "Oracle.JDK.18"
+ "WPFInstalljava18": {
+ "winget": "EclipseAdoptium.Temurin.18.JRE"
},
- "Installjava8": {
- "winget": "AdoptOpenJDK.OpenJDK.8"
+ "WPFInstalljava8": {
+ "winget": "EclipseAdoptium.Temurin.8.JRE"
},
- "Installjetbrains": {
+ "WPFInstalljava19": {
+ "winget": "EclipseAdoptium.Temurin.19.JRE"
+ },
+ "WPFInstalljava17": {
+ "winget": "EclipseAdoptium.Temurin.17.JRE"
+ },
+ "WPFInstalljava11": {
+ "winget": "EclipseAdoptium.Temurin.11.JRE"
+ },
+ "WPFInstalljetbrains": {
"winget": "JetBrains.Toolbox"
},
- "Installkeepass": {
+ "WPFInstallkeepass": {
"winget": "KeePassXCTeam.KeePassXC"
},
- "Installlibrewolf": {
+ "WPFInstalllibrewolf": {
"winget": "LibreWolf.LibreWolf"
},
- "Installmalwarebytes": {
+ "WPFInstallmalwarebytes": {
"winget": "Malwarebytes.Malwarebytes"
},
- "Installmatrix": {
+ "WPFInstallmatrix": {
"winget": "Element.Element"
},
- "Installmpc": {
+ "WPFInstallmpc": {
"winget": "clsid2.mpc-hc"
},
- "Installmremoteng": {
+ "WPFInstallmremoteng": {
"winget": "mRemoteNG.mRemoteNG"
},
- "Installnodejs": {
+ "WPFInstallnodejs": {
"winget": "OpenJS.NodeJS"
},
- "Installnodejslts": {
+ "WPFInstallnodejslts": {
"winget": "OpenJS.NodeJS.LTS"
},
- "Installnotepadplus": {
+ "WPFInstallnotepadplus": {
"winget": "Notepad++.Notepad++"
},
- "Installnvclean": {
+ "WPFInstallnvclean": {
"winget": "TechPowerUp.NVCleanstall"
},
- "Installobs": {
+ "WPFInstallobs": {
"winget": "OBSProject.OBSStudio"
},
- "Installobsidian": {
+ "WPFInstallobsidian": {
"winget": "Obsidian.Obsidian"
},
- "Installpowertoys": {
+ "WPFInstallpowertoys": {
"winget": "Microsoft.PowerToys"
},
- "Installputty": {
+ "WPFInstallputty": {
"winget": "PuTTY.PuTTY"
},
- "Installpython3": {
+ "WPFInstallpython3": {
"winget": "Python.Python.3"
},
- "Installrevo": {
- "winget": "RevoUninstaller.RevoUninstaller"
+ "WPFInstallrevo": {
+ "winget": "RevoUnWPFInstaller.RevoUnWPFInstaller"
},
- "Installrufus": {
+ "WPFInstallrufus": {
"winget": "Rufus.Rufus"
},
- "Installsevenzip": {
+ "WPFInstallsevenzip": {
"winget": "7zip.7zip"
},
- "Installsharex": {
+ "WPFInstallsharex": {
"winget": "ShareX.ShareX"
},
- "Installsignal": {
+ "WPFInstallsignal": {
"winget": "OpenWhisperSystems.Signal"
},
- "Installskype": {
+ "WPFInstallskype": {
"winget": "Microsoft.Skype"
},
- "Installslack": {
+ "WPFInstallslack": {
"winget": "SlackTechnologies.Slack"
},
- "Installsteam": {
+ "WPFInstallsteam": {
"winget": "Valve.Steam"
},
- "Installsublime": {
+ "WPFInstallsublime": {
"winget": "SublimeHQ.SublimeText.4"
},
- "Installsumatra": {
+ "WPFInstallsumatra": {
"winget": "SumatraPDF.SumatraPDF"
},
- "Installteams": {
+ "WPFInstallteams": {
"winget": "Microsoft.Teams"
},
- "Installteamviewer": {
+ "WPFInstallteamviewer": {
"winget": "TeamViewer.TeamViewer"
},
- "Installterminal": {
+ "WPFInstallterminal": {
"winget": "Microsoft.WindowsTerminal"
},
- "Installtreesize": {
+ "WPFInstalltreesize": {
"winget": "JAMSoftware.TreeSize.Free"
},
- "Installttaskbar": {
+ "WPFInstallttaskbar": {
"winget": "TranslucentTB.TranslucentTB"
},
- "Installvisualstudio": {
+ "WPFInstallvisualstudio": {
"winget": "Microsoft.VisualStudio.2022.Community"
},
- "Installvivaldi": {
+ "WPFInstallvivaldi": {
"winget": "VivaldiTechnologies.Vivaldi"
},
- "Installvlc": {
+ "WPFInstallvlc": {
"winget": "VideoLAN.VLC"
},
- "Installvoicemeeter": {
+ "WPFInstallvoicemeeter": {
"winget": "VB-Audio.Voicemeeter"
},
- "Installvscode": {
+ "WPFInstallvscode": {
"winget": "Git.Git;Microsoft.VisualStudioCode"
},
- "Installvscodium": {
+ "WPFInstallvscodium": {
"winget": "Git.Git;VSCodium.VSCodium"
},
- "Installwindirstat": {
+ "WPFInstallwindirstat": {
"winget": "WinDirStat.WinDirStat"
},
- "Installscp": {
+ "WPFInstallscp": {
"winget": "WinSCP.WinSCP"
},
- "Installwireshark": {
+ "WPFInstallwireshark": {
"winget": "WiresharkFoundation.Wireshark"
},
- "Installzoom": {
+ "WPFInstallzoom": {
"winget": "Zoom.Zoom"
},
- "Installlibreoffice": {
+ "WPFInstalllibreoffice": {
"winget": "TheDocumentFoundation.LibreOffice"
},
- "Installshell": {
+ "WPFInstallshell": {
"winget": "Nilesoft.Shell"
},
- "Installklite": {
+ "WPFInstallklite": {
"winget": "CodecGuide.K-LiteCodecPack.Standard"
},
- "Installsandboxie": {
+ "WPFInstallsandboxie": {
"winget": "Sandboxie.Plus"
},
- "Installprocesslasso": {
+ "WPFInstallprocesslasso": {
"winget": "BitSum.ProcessLasso"
},
- "Installwinmerge": {
+ "WPFInstallwinmerge": {
"winget": "WinMerge.WinMerge"
},
- "Installdotnet3": {
+ "WPFInstalldotnet3": {
"winget": "Microsoft.DotNet.DesktopRuntime.3_1"
},
- "Installdotnet5": {
+ "WPFInstalldotnet5": {
"winget": "Microsoft.DotNet.DesktopRuntime.5"
},
- "Installdotnet6": {
+ "WPFInstalldotnet6": {
"winget": "Microsoft.DotNet.DesktopRuntime.6"
},
- "Installvc2015_64": {
+ "WPFInstallvc2015_64": {
"winget": "Microsoft.VC++2015-2022Redist-x64"
},
- "Installvc2015_32": {
+ "WPFInstallvc2015_32": {
"winget": "Microsoft.VC++2015-2022Redist-x86"
},
- "Installfoxpdf": {
+ "WPFInstallfoxpdf": {
"winget": "Foxit.PhantomPDF"
},
- "Installonlyoffice": {
+ "WPFInstallonlyoffice": {
"winget": "ONLYOFFICE.DesktopEditors"
},
- "Installflux": {
+ "WPFInstallflux": {
"winget": "flux.flux"
},
- "Installitunes": {
+ "WPFInstallitunes": {
"winget": "Apple.iTunes"
},
- "Installcider": {
+ "WPFInstallcider": {
"winget": "CiderCollective.Cider"
},
- "Installjoplin": {
+ "WPFInstalljoplin": {
"winget": "Joplin.Joplin"
},
- "Installopenoffice": {
+ "WPFInstallopenoffice": {
"winget": "Apache.OpenOffice"
},
- "Installrustdesk": {
+ "WPFInstallrustdesk": {
"winget": "RustDesk.RustDesk"
},
- "Installjami": {
+ "WPFInstalljami": {
"winget": "SFLinux.Jami"
},
- "Installjdownloader": {
+ "WPFInstalljdownloader": {
"winget": "AppWork.JDownloader"
},
- "Installsimplewall": {
+ "WPFInstallsimplewall": {
"Winget": "Henry++.simplewall"
},
- "Installrustlang": {
+ "WPFInstallrustlang": {
"Winget": "Rustlang.Rust.MSVC"
},
- "Installalacritty": {
+ "WPFInstallalacritty": {
"Winget": "Alacritty.Alacritty"
},
- "Installkdenlive": {
+ "WPFInstallkdenlive": {
"Winget": "KDE.Kdenlive"
},
- "Installglaryutilities": {
+ "WPFInstallglaryutilities": {
"Winget": "Glarysoft.GlaryUtilities"
},
- "Installtwinkletray": {
+ "WPFInstalltwinkletray": {
"Winget": "xanderfrangos.twinkletray"
},
- "Installidm": {
+ "WPFInstallidm": {
"Winget": "Tonec.InternetDownloadManager"
},
- "Installviber": {
+ "WPFInstallviber": {
"Winget": "Viber.Viber"
},
- "Installgit": {
+ "WPFInstallgit": {
"Winget": "Git.Git"
},
- "Installwiztree": {
+ "WPFInstallwiztree": {
"Winget": "AntibodySoftware.WizTree"
},
- "Installtor": {
+ "WPFInstalltor": {
"Winget": "TorProject.TorBrowser"
+ },
+ "WPFInstallkrita": {
+ "winget": "KDE.Krita"
+ },
+ "WPFInstallnglide": {
+ "winget": "ZeusSoftware.nGlide"
+ },
+ "WPFInstallkodi": {
+ "winget": "XBMCFoundation.Kodi"
+ },
+ "WPFInstalltelegram": {
+ "winget": "Telegram.TelegramDesktop"
+ },
+ "WPFInstallunity": {
+ "winget": "UnityTechnologies.UnityHub"
+ },
+ "WPFInstallqbittorrent": {
+ "winget": "qBittorrent.qBittorrent"
+ },
+ "WPFInstallorigin": {
+ "winget": "ElectronicArts.EADesktop"
+ },
+ "WPFInstallopenshell": {
+ "winget": "Open-Shell.Open-Shell-Menu"
+ },
+ "WPFInstallbluestacks": {
+ "winget": "BlueStack.BlueStacks"
+ },
+ "WPFInstallstrawberry": {
+ "winget": "StrawberryMusicPlayer.Strawberry"
+ },
+ "WPFInstallsqlstudio": {
+ "winget": "Microsoft.SQLServerManagementStudio"
+ },
+ "WPFInstallwaterfox": {
+ "winget": "Waterfox.Waterfox"
+ },
+ "WPFInstallpowershell": {
+ "winget": "Microsoft.PowerShell"
+ },
+ "WPFInstallprocessmonitor": {
+ "winget": "Microsoft.Sysinternals.ProcessMonitor"
+ },
+ "WPFInstallonedrive": {
+ "winget": "Microsoft.OneDrive"
+ },
+ "WPFInstalledge": {
+ "winget": "Microsoft.Edge"
+ },
+ "WPFInstallnuget": {
+ "winget": "Microsoft.NuGet"
}
}
}
diff --git a/config/helperscript.ps1 b/config/helperscript.ps1
index 8f99a760..ccd3add7 100644
--- a/config/helperscript.ps1
+++ b/config/helperscript.ps1
@@ -20,10 +20,10 @@ Example:
{
"install": {
- "Installadobe": {
+ "WPFInstalladobe": {
"winget": "Adobe.Acrobat.Reader.64-bit"
},
- "Installadvancedip": {
+ "WPFInstalladvancedip": {
"winget": "Famatech.AdvancedIPScanner"
}
}
@@ -32,8 +32,9 @@ Example:
#>
#Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
+#------Do not delete WPF------
-$NameofButton = ""
+$NameofButton = "WPF" + ""
$WingetCommand = ""
$ButtonToAdd = New-Object psobject
diff --git a/config/tweaks.json b/config/tweaks.json
index 33f527f7..0737812c 100644
--- a/config/tweaks.json
+++ b/config/tweaks.json
@@ -1135,6 +1135,56 @@
# It will just not bother u anymore"
]
},
+ "MiscTweaksDisableMouseAcceleration": {
+ "registry": [
+ {
+ "path": "HKCU:\\Control Panel\\Mouse",
+ "OriginalValue": "1",
+ "name": "MouseSpeed",
+ "value": "0",
+ "type": "String"
+ },
+ {
+ "path": "HKCU:\\Control Panel\\Mouse",
+ "OriginalValue": "6",
+ "name": "MouseThreshold1",
+ "value": "0",
+ "type": "String"
+ },
+ {
+ "path": "HKCU:\\Control Panel\\Mouse",
+ "OriginalValue": "10",
+ "name": "MouseThreshold2",
+ "value": "0",
+ "type": "String"
+ }
+ ]
+ },
+ "MiscTweaksEnableMouseAcceleration": {
+ "registry": [
+ {
+ "path": "HKCU:\\Control Panel\\Mouse",
+ "OriginalValue": "1",
+ "name": "MouseSpeed",
+ "value": "1",
+ "type": "String"
+ },
+ {
+ "path": "HKCU:\\Control Panel\\Mouse",
+ "OriginalValue": "6",
+ "name": "MouseThreshold1",
+ "value": "6",
+ "type": "String"
+ },
+ {
+ "path": "HKCU:\\Control Panel\\Mouse",
+ "OriginalValue": "10",
+ "name": "MouseThreshold2",
+ "value": "10",
+ "type": "String"
+ }
+ ]
+ },
"EssTweaksDeleteTempFiles": {
"InvokeScript": [
"Get-ChildItem -Path \"C:\\Windows\\Temp\" *.* -Recurse | Remove-Item -Force -Recurse
diff --git a/pester/winutil.Tests.ps1 b/pester/winutil.Tests.ps1
index 15d70546..8f05f6f9 100644
--- a/pester/winutil.Tests.ps1
+++ b/pester/winutil.Tests.ps1
@@ -14,44 +14,48 @@
#region Load Variables needed for testing
#Config Files
- $global:application = get-content ./config/applications.json | ConvertFrom-Json
- $global:preset = get-content ./config/preset.json | ConvertFrom-Json
- $global:feature = get-content ./config/feature.json | ConvertFrom-Json
- $global:tweaks = get-content ./config/tweaks.json | ConvertFrom-Json
+ $global:configs = @{}
+
+ (
+ "applications",
+ "tweaks",
+ "preset",
+ "feature"
+ ) | ForEach-Object {
+ $global:configs["$PSItem"] = Get-Content .\config\$PSItem.json | ConvertFrom-Json
+ }
#GUI
- $global:sync = [Hashtable]::Synchronized(@{})
$global:inputXML = get-content MainWindow.xaml
$global:inputXML = $global:inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^
Param ([string]$Button)
+
+ #Use this to get the name of the button
+ #[System.Windows.MessageBox]::Show("$Button","Chris Titus Tech's Windows Utility","OK","Info")
+
Switch -Wildcard ($Button){
"*Tab*BT*" {switchtab $Button}
@@ -58,6 +62,17 @@ function Invoke-Button {
"Panelsystem" {cmd /c sysdm.cpl}
"Paneluser" {cmd /c "control userpasswords2"}
"Updates*" {Invoke-command $sync.GUIUpdates -ArgumentList "$button"}
+ "FixesUpdate" {Invoke-command $sync.GUIUpdates -ArgumentList "$button"}
+ "*AutoLogin" {Invoke-Runspace $Sync.AutologinInstall}
+ "DisableDarkMode" {Invoke-Runspace $Sync.DarkModeToggle -ArgumentList "$False"}
+ "EnableDarkMode" {Invoke-Runspace $Sync.DarkModeToggle -ArgumentList "$True"}
+ "PanelDISM" {
+ Start-Process PowerShell -ArgumentList "Write-Host '(1/4) Chkdsk' -ForegroundColor Green; Chkdsk /scan;
+ Write-Host '`n(2/4) SFC - 1st scan' -ForegroundColor Green; sfc /scannow;
+ Write-Host '`n(3/4) DISM' -ForegroundColor Green; DISM /Online /Cleanup-Image /Restorehealth;
+ Write-Host '`n(4/4) SFC - 2nd scan' -ForegroundColor Green; sfc /scannow;
+ Read-Host '`nPress Enter to Continue'" -verb runas
+ }
}
}
@@ -219,6 +234,30 @@ $sync.WriteLogs = {
Write-Verbose "$date $delimiter $Level $delimiter $message"
}
+$Sync.AutologinInstall = {
+
+ # Official Microsoft recommendation https://learn.microsoft.com/en-us/sysinternals/downloads/autologon
+ Invoke-WebRequest "https://live.sysinternals.com/Autologon.exe" -OutFile $env:TEMP\autologin.exe
+ Start-Process -FilePath powershell.exe -Verb runas -ArgumentList "-c $ENV:Temp\autologin.exe" -WindowStyle Hidden
+
+}
+
+$Sync.DarkModeToggle = {
+ param($enabled)
+
+ $Theme = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
+
+ if($enabled -eq $True){
+ Set-ItemProperty $Theme AppsUseLightTheme -Value 0
+ Invoke-command $sync.WriteLogs -ArgumentList ("INFO","Dark Mode has been enabled",$sync.logfile)
+ }
+ if($enabled -eq $False){
+ Set-ItemProperty $Theme AppsUseLightTheme -Value 1
+ Invoke-command $sync.WriteLogs -ArgumentList ("INFO","Dark Mode has been disabled",$sync.logfile)
+ }
+
+}
+
#===========================================================================
# Install Tab
#===========================================================================
@@ -273,7 +312,7 @@ $Sync.GUIInstallPrograms = {
else{
foreach ($program in $programstoinstall){
- $($sync.applications.install.$program.winget) -split ";" | ForEach-Object {
+ $($sync.applications.install.$("WPF" + $program).winget) -split ";" | ForEach-Object {
if($psitem){
$winget += ",$psitem"
}Else{
@@ -951,7 +990,7 @@ $sync.ScriptUpdates = {
param($Level, $Message, $LogPath)
Invoke-command $sync.WriteLogs -ArgumentList ($Level,$Message, $LogPath)
}
- if($updatestoconfigure -eq "Updatesdefault"){
+ if($updatestoconfigure -eq "FixesUpdate"){
# Source: https://github.com/rgl/windows-vagrant/blob/master/disable-windows-updates.ps1 reversed!
Set-StrictMode -Version Latest
$ProgressPreference = 'SilentlyContinue'
@@ -1240,6 +1279,43 @@ $sync.ScriptUpdates = {
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferFeatureUpdatesPeriodInDays" -Type DWord -Value 365
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferQualityUpdatesPeriodInDays " -Type DWord -Value 4
}
+ if($updatestoconfigure -eq "Updatesdefault"){
+ If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) {
+ New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null
+ }
+ Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -Type DWord -Value 0
+ Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -Type DWord -Value 3
+ If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config")) {
+ New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Force | Out-Null
+ }
+ Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 1
+
+ $services = @(
+ "BITS"
+ "wuauserv"
+ )
+
+ foreach ($service in $services) {
+ # -ErrorAction SilentlyContinue is so it doesn't write an error to stdout if a service doesn't exist
+
+ Write-Host "Setting $service StartupType to Automatic"
+ Get-Service -Name $service -ErrorAction SilentlyContinue | Set-Service -StartupType Automatic
+ }
+ Write-Logs -Level "INFO" -LogPath $sync.logfile -Message "Enabling driver offering through Windows Update..."
+ Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Name "PreventDeviceMetadataFromNetwork" -ErrorAction SilentlyContinue
+ Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontPromptForWindowsUpdate" -ErrorAction SilentlyContinue
+ Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontSearchWindowsUpdate" -ErrorAction SilentlyContinue
+ Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DriverUpdateWizardWuSearchEnabled" -ErrorAction SilentlyContinue
+ Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -ErrorAction SilentlyContinue
+ Write-Logs -Level "INFO" -LogPath $sync.logfile -Message "Enabling Windows Update automatic restart..."
+ Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -ErrorAction SilentlyContinue
+ Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUPowerManagement" -ErrorAction SilentlyContinue
+ Write-Logs -Level "INFO" -LogPath $sync.logfile -Message "Enabled driver offering through Windows Update"
+ Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "BranchReadinessLevel" -ErrorAction SilentlyContinue
+ Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferFeatureUpdatesPeriodInDays" -ErrorAction SilentlyContinue
+ Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferQualityUpdatesPeriodInDays " -ErrorAction SilentlyContinue
+ Write-Logs -Level "INFO" -LogPath $sync.logfile -Message "Updates set to default"
+ }
Write-Logs -Level "INFO" -LogPath $sync.logfile -Message "Process complete. Please reboot your computer."
@@ -1381,7 +1457,7 @@ if($gui -eq $true){
How to run Arguments
First step is to set the $env:args variable with the setups you wish to do. To do multiple items put a " " space between each command.
-For commands that require input seperate the command with a semicolon ":" and provide the values to pass to that argument seperated by a comma ",". (IE: Install:git.git,windirstat.windirstat)
+For commands that require input seperate the command with a colon ":" and provide the values to pass to that argument seperated by a comma ",". (IE: Install:git.git,windirstat.windirstat)
Supported arguments:
@@ -1416,6 +1492,15 @@ Example usage:
If($env:args){
Write-Verbose "Arguments Detected, Running Args"
+
+#Ensure Computer Info is populated before continuing
+$x = 0
+do{
+ Start-Sleep -Seconds 1
+ $x++
+}until($sync.ComputerInfo -or $x -eq 10)
+if($x -eq 5){Invoke-command $sync.WriteLogs -ArgumentList ("WARINING","Failed to pull computer info after 5 seconds, this can cause some scripts to fail.", $sync.logfile)}
+
If($env:args -match '\bInstallUpgrade\b'){Invoke-command $sync.ScriptsInstallPrograms -ArgumentList "Upgrade"}
If($env:args -match '\bUndoTweaks\b'){Invoke-command $sync.ScriptUndoTweaks}
If($env:args -match '\bPanelControl\b'){cmd /c control}
diff --git a/winutil.ps1 b/winutil.ps1
index fcec0dbc..f15b03b2 100644
--- a/winutil.ps1
+++ b/winutil.ps1
@@ -1,14 +1,39 @@
#for CI/CD
-$BranchToUse = 'main'
+$BranchToUse = 'test'
<#
.NOTES
Author : Chris Titus @christitustech
GitHub : https://github.com/ChrisTitusTech
Version 0.0.1
#>
-
+# $inputXML = Get-Content "MainWindow.xaml" #uncomment for development
$inputXML = (new-object Net.WebClient).DownloadString("https://raw.githubusercontent.com/ChrisTitusTech/winutil/$BranchToUse/MainWindow.xaml") #uncomment for Production
+# Choco install
+$testchoco = powershell choco -v
+if(-not($testchoco)){
+ Write-Output "Seems Chocolatey is not installed, installing now"
+ Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
+ powershell choco feature enable -n allowGlobalConfirmation
+}
+else{
+ Write-Output "Chocolatey Version $testchoco is already installed"
+}
+
+#Load config files to hashtable
+$configs = @{}
+
+(
+ "applications",
+ "tweaks",
+ "preset",
+ "feature"
+) | ForEach-Object {
+ #$configs["$PSItem"] = Get-Content .\config\$PSItem.json | ConvertFrom-Json
+ $configs["$psitem"] = Invoke-RestMethod "https://raw.githubusercontent.com/ChrisTitusTech/winutil/$BranchToUse/config/$psitem.json"
+}
+
+
$inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^
+
+ Param($Group)
+
+ $CheckBoxes = get-variable | Where-Object {$psitem.name -like "$Group*" -and $psitem.value.GetType().name -eq "CheckBox"}
+ $Output = New-Object System.Collections.Generic.List[System.Object]
+
+ if($Group -eq "WPFInstall"){
+ Foreach ($CheckBox in $CheckBoxes){
+ if($checkbox.value.ischecked -eq $true){
+ $output.Add("$($configs.applications.install.$($checkbox.name).winget)")
+ $checkbox.value.ischecked = $false
+ }
+ }
+ }
+
+ Write-Output $Output
+}
#===========================================================================
# Global Variables
#===========================================================================
-$AppTitle = "Chris Titus Tech's Windows Utility"
+$AppTitle = "Chris Titus Tech's Windows Utility"
#===========================================================================
# Navigation Controls
@@ -106,439 +165,10 @@ $WPFTab4BT.Add_Click({
#===========================================================================
# Tab 1 - Install
#===========================================================================
+
$WPFinstall.Add_Click({
- $wingetinstall = New-Object System.Collections.Generic.List[System.Object]
- If ( $WPFInstalllibreoffice.IsChecked -eq $true ) {
- $wingetinstall.Add("TheDocumentFoundation.LibreOffice")
- $WPFInstalllibreoffice.IsChecked = $false
- }
- If ( $WPFInstalladobe.IsChecked -eq $true ) {
- $wingetinstall.Add("Adobe.Acrobat.Reader.64-bit")
- $WPFInstalladobe.IsChecked = $false
- }
- If ( $WPFInstalladvancedip.IsChecked -eq $true ) {
- $wingetinstall.Add("Famatech.AdvancedIPScanner")
- $WPFInstalladvancedip.IsChecked = $false
- }
- If ( $WPFInstallatom.IsChecked -eq $true ) {
- $wingetinstall.Add("GitHub.Atom")
- $WPFInstallatom.IsChecked = $false
- }
- If ( $WPFInstallaudacity.IsChecked -eq $true ) {
- $wingetinstall.Add("Audacity.Audacity")
- $WPFInstallaudacity.IsChecked = $false
- }
- If ( $WPFInstallautohotkey.IsChecked -eq $true ) {
- $wingetinstall.Add("Lexikos.AutoHotkey")
- $WPFInstallautohotkey.IsChecked = $false
- }
- If ( $WPFInstallbrave.IsChecked -eq $true ) {
- $wingetinstall.Add("Brave.Brave")
- $WPFInstallbrave.IsChecked = $false
- }
- If ( $WPFInstallchrome.IsChecked -eq $true ) {
- $wingetinstall.Add("Google.Chrome")
- $WPFInstallchrome.IsChecked = $false
- }
- If ( $WPFInstalltor.IsChecked -eq $true ) {
- $wingetinstall.Add("TorProject.TorBrowser")
- $WPFInstalltor.IsChecked = $false
- }
- If ( $WPFInstalldiscord.IsChecked -eq $true ) {
- $wingetinstall.Add("Discord.Discord")
- $WPFInstalldiscord.IsChecked = $false
- }
- If ( $WPFInstallesearch.IsChecked -eq $true ) {
- $wingetinstall.Add("voidtools.Everything --source winget")
- $WPFInstallesearch.IsChecked = $false
- }
- If ( $WPFInstalletcher.IsChecked -eq $true ) {
- $wingetinstall.Add("Balena.Etcher")
- $WPFInstalletcher.IsChecked = $false
- }
- If ( $WPFInstallfirefox.IsChecked -eq $true ) {
- $wingetinstall.Add("Mozilla.Firefox")
- $WPFInstallfirefox.IsChecked = $false
- }
- If ( $WPFInstallgimp.IsChecked -eq $true ) {
- $wingetinstall.Add("GIMP.GIMP")
- $WPFInstallgimp.IsChecked = $false
- }
- If ( $WPFInstallgit.IsChecked -eq $true ) {
- $wingetinstall.Add("Git.Git")
- $WPFInstallgithubdesktop.IsChecked = $false
- }
- If ( $WPFInstallgithubdesktop.IsChecked -eq $true ) {
- $wingetinstall.Add("GitHub.GitHubDesktop")
- $WPFInstallgithubdesktop.IsChecked = $false
- }
- If ( $WPFInstallimageglass.IsChecked -eq $true ) {
- $wingetinstall.Add("DuongDieuPhap.ImageGlass")
- $WPFInstallimageglass.IsChecked = $false
- }
- If ( $WPFInstalljava8.IsChecked -eq $true ) {
- $wingetinstall.Add("AdoptOpenJDK.OpenJDK.8")
- $WPFInstalljava8.IsChecked = $false
- }
- If ( $WPFInstalljava16.IsChecked -eq $true ) {
- $wingetinstall.Add("AdoptOpenJDK.OpenJDK.16")
- $WPFInstalljava16.IsChecked = $false
- }
- If ( $WPFInstalljava18.IsChecked -eq $true ) {
- $wingetinstall.Add("Oracle.JDK.18")
- $WPFInstalljava18.IsChecked = $false
- }
- If ( $WPFInstalljetbrains.IsChecked -eq $true ) {
- $wingetinstall.Add("JetBrains.Toolbox")
- $WPFInstalljetbrains.IsChecked = $false
- }
- If ( $WPFInstallmpc.IsChecked -eq $true ) {
- $wingetinstall.Add("clsid2.mpc-hc")
- $WPFInstallmpc.IsChecked = $false
- }
- If ( $WPFInstallnodejs.IsChecked -eq $true ) {
- $wingetinstall.Add("OpenJS.NodeJS")
- $WPFInstallnodejs.IsChecked = $false
- }
- If ( $WPFInstallnodejslts.IsChecked -eq $true ) {
- $wingetinstall.Add("OpenJS.NodeJS.LTS")
- $WPFInstallnodejslts.IsChecked = $false
- }
- If ( $WPFInstallnotepadplus.IsChecked -eq $true ) {
- $wingetinstall.Add("Notepad++.Notepad++")
- $WPFInstallnotepadplus.IsChecked = $false
- }
- If ( $WPFInstallpowertoys.IsChecked -eq $true ) {
- $wingetinstall.Add("Microsoft.PowerToys")
- $WPFInstallpowertoys.IsChecked = $false
- }
- If ( $WPFInstallputty.IsChecked -eq $true ) {
- $wingetinstall.Add("PuTTY.PuTTY")
- $WPFInstallputty.IsChecked = $false
- }
- If ( $WPFInstallpython3.IsChecked -eq $true ) {
- $wingetinstall.Add("Python.Python.3")
- $WPFInstallpython3.IsChecked = $false
- }
- If ( $WPFInstallrustlang.IsChecked -eq $true ) {
- $wingetinstall.Add("Rustlang.Rust.MSVC")
- $WPFInstallrustlang.IsChecked = $false
- }
- If ( $WPFInstallsevenzip.IsChecked -eq $true ) {
- $wingetinstall.Add("7zip.7zip")
- $WPFInstallsevenzip.IsChecked = $false
- }
- If ( $WPFInstallsharex.IsChecked -eq $true ) {
- $wingetinstall.Add("ShareX.ShareX")
- $WPFInstallsharex.IsChecked = $false
- }
- If ( $WPFInstallsublime.IsChecked -eq $true ) {
- $wingetinstall.Add("SublimeHQ.SublimeText.4")
- $WPFInstallsublime.IsChecked = $false
- }
- If ( $WPFInstallsumatra.IsChecked -eq $true ) {
- $wingetinstall.Add("SumatraPDF.SumatraPDF")
- $WPFInstallsumatra.IsChecked = $false
- }
- If ( $WPFInstallterminal.IsChecked -eq $true ) {
- $wingetinstall.Add("Microsoft.WindowsTerminal")
- $WPFInstallterminal.IsChecked = $false
- }
- If ( $WPFInstallidm.IsChecked -eq $true ) {
- $wingetinstall.Add("Tonec.InternetDownloadManager")
- $WPFInstallidm.IsChecked = $false
- }
- If ( $WPFInstallalacritty.IsChecked -eq $true ) {
- $wingetinstall.Add("Alacritty.Alacritty")
- $WPFInstallalacritty.IsChecked = $false
- }
- If ( $WPFInstallttaskbar.IsChecked -eq $true ) {
- $wingetinstall.Add("9PF4KZ2VN4W9")
- $WPFInstallttaskbar.IsChecked = $false
- }
- If ( $WPFInstallvlc.IsChecked -eq $true ) {
- $wingetinstall.Add("VideoLAN.VLC")
- $WPFInstallvlc.IsChecked = $false
- }
- If ( $WPFInstallkdenlive.IsChecked -eq $true ) {
- $wingetinstall.Add("KDE.Kdenlive")
- $WPFInstallkdenlive.IsChecked = $false
- }
- If ( $WPFInstallvscode.IsChecked -eq $true ) {
- $wingetinstall.Add("Git.Git")
- $wingetinstall.Add("Microsoft.VisualStudioCode --source winget")
- $WPFInstallvscode.IsChecked = $false
- }
- If ( $WPFInstallvscodium.IsChecked -eq $true ) {
- $wingetinstall.Add("Git.Git")
- $wingetinstall.Add("VSCodium.VSCodium")
- $WPFInstallvscodium.IsChecked = $false
- }
- If ( $WPFInstallscp.IsChecked -eq $true ) {
- $wingetinstall.Add("WinSCP.WinSCP")
- $WPFInstallscp.IsChecked = $false
- }
- If ( $WPFInstallanydesk.IsChecked -eq $true ) {
- $wingetinstall.Add("AnyDeskSoftwareGmbH.AnyDesk")
- $WPFInstallanydesk.IsChecked = $false
- }
- If ( $WPFInstallbitwarden.IsChecked -eq $true ) {
- $wingetinstall.Add("Bitwarden.Bitwarden")
- $WPFInstallbitwarden.IsChecked = $false
- }
- If ( $WPFInstallblender.IsChecked -eq $true ) {
- $wingetinstall.Add("BlenderFoundation.Blender")
- $WPFInstallblender.IsChecked = $false
- }
- If ( $WPFInstallchromium.IsChecked -eq $true ) {
- $wingetinstall.Add("eloston.ungoogled-chromium")
- $WPFInstallchromium.IsChecked = $false
- }
- If ( $WPFInstallcpuz.IsChecked -eq $true ) {
- $wingetinstall.Add("CPUID.CPU-Z")
- $WPFInstallcpuz.IsChecked = $false
- }
- If ( $WPFInstalleartrumpet.IsChecked -eq $true ) {
- $wingetinstall.Add("File-New-Project.EarTrumpet")
- $WPFInstalleartrumpet.IsChecked = $false
- }
- If ( $WPFInstallepicgames.IsChecked -eq $true ) {
- $wingetinstall.Add("EpicGames.EpicGamesLauncher")
- $WPFInstallepicgames.IsChecked = $false
- }
- If ( $WPFInstallflameshot.IsChecked -eq $true ) {
- $wingetinstall.Add("Flameshot.Flameshot")
- $WPFInstallflameshot.IsChecked = $false
- }
- If ( $WPFInstallfoobar.IsChecked -eq $true ) {
- $wingetinstall.Add("PeterPawlowski.foobar2000")
- $WPFInstallfoobar.IsChecked = $false
- }
- If ( $WPFInstallgog.IsChecked -eq $true ) {
- $wingetinstall.Add("GOG.Galaxy")
- $WPFInstallgog.IsChecked = $false
- }
- If ( $WPFInstallgpuz.IsChecked -eq $true ) {
- $wingetinstall.Add("TechPowerUp.GPU-Z")
- $WPFInstallgpuz.IsChecked = $false
- }
- If ( $WPFInstallglaryutilities.IsChecked -eq $true ) {
- $wingetinstall.Add("Glarysoft.GlaryUtilities")
- $WPFInstallglaryutilities.IsChecked = $false
- }
- If ( $WPFInstallgreenshot.IsChecked -eq $true ) {
- $wingetinstall.Add("Greenshot.Greenshot")
- $WPFInstallgreenshot.IsChecked = $false
- }
- If ( $WPFInstallhandbrake.IsChecked -eq $true ) {
- $wingetinstall.Add("HandBrake.HandBrake")
- $WPFInstallhandbrake.IsChecked = $false
- }
- If ( $WPFInstallhexchat.IsChecked -eq $true ) {
- $wingetinstall.Add("HexChat.HexChat")
- $WPFInstallhexchat.IsChecked = $false
- }
- If ( $WPFInstallhwinfo.IsChecked -eq $true ) {
- $wingetinstall.Add("REALiX.HWiNFO")
- $WPFInstallhwinfo.IsChecked = $false
- }
- If ( $WPFInstallinkscape.IsChecked -eq $true ) {
- $wingetinstall.Add("Inkscape.Inkscape")
- $WPFInstallinkscape.IsChecked = $false
- }
- If ( $WPFInstallkeepass.IsChecked -eq $true ) {
- $wingetinstall.Add("KeePassXCTeam.KeePassXC")
- $WPFInstallkeepass.IsChecked = $false
- }
- If ( $WPFInstalllibrewolf.IsChecked -eq $true ) {
- $wingetinstall.Add("LibreWolf.LibreWolf")
- $WPFInstalllibrewolf.IsChecked = $false
- }
- If ( $WPFInstallmalwarebytes.IsChecked -eq $true ) {
- $wingetinstall.Add("Malwarebytes.Malwarebytes")
- $WPFInstallmalwarebytes.IsChecked = $false
- }
- If ( $WPFInstallmatrix.IsChecked -eq $true ) {
- $wingetinstall.Add("Element.Element")
- $WPFInstallmatrix.IsChecked = $false
- }
- If ( $WPFInstallmremoteng.IsChecked -eq $true ) {
- $wingetinstall.Add("mRemoteNG.mRemoteNG")
- $WPFInstallmremoteng.IsChecked = $false
- }
- If ( $WPFInstallnvclean.IsChecked -eq $true ) {
- $wingetinstall.Add("TechPowerUp.NVCleanstall")
- $WPFInstallnvclean.IsChecked = $false
- }
- If ( $WPFInstallobs.IsChecked -eq $true ) {
- $wingetinstall.Add("OBSProject.OBSStudio")
- $WPFInstallobs.IsChecked = $false
- }
- If ( $WPFInstallobsidian.IsChecked -eq $true ) {
- $wingetinstall.Add("Obsidian.Obsidian")
- $WPFInstallobsidian.IsChecked = $false
- }
- If ( $WPFInstallrevo.IsChecked -eq $true ) {
- $wingetinstall.Add("RevoUninstaller.RevoUninstaller")
- $WPFInstallrevo.IsChecked = $false
- }
- If ( $WPFInstallrufus.IsChecked -eq $true ) {
- $wingetinstall.Add("Rufus.Rufus")
- $WPFInstallrufus.IsChecked = $false
- }
- If ( $WPFInstallsignal.IsChecked -eq $true ) {
- $wingetinstall.Add("OpenWhisperSystems.Signal")
- $WPFInstallsignal.IsChecked = $false
- }
- If ( $WPFInstallskype.IsChecked -eq $true ) {
- $wingetinstall.Add("Microsoft.Skype")
- $WPFInstallskype.IsChecked = $false
- }
- If ( $WPFInstallslack.IsChecked -eq $true ) {
- $wingetinstall.Add("SlackTechnologies.Slack")
- $WPFInstallslack.IsChecked = $false
- }
- If ( $WPFInstallspotify.IsChecked -eq $true ) {
- $wingetinstall.Add("Spotify.Spotify")
- $WPFInstallspotify.IsChecked = $false
- }
- If ( $WPFInstallsteam.IsChecked -eq $true ) {
- $wingetinstall.Add("Valve.Steam")
- $WPFInstallsteam.IsChecked = $false
- }
- If ( $WPFInstallteamviewer.IsChecked -eq $true ) {
- $wingetinstall.Add("TeamViewer.TeamViewer")
- $WPFInstallteamviewer.IsChecked = $false
- }
- If ( $WPFInstallteams.IsChecked -eq $true ) {
- $wingetinstall.Add("Microsoft.Teams")
- $WPFInstallteams.IsChecked = $false
- }
- If ( $WPFInstalltreesize.IsChecked -eq $true ) {
- $wingetinstall.Add("JAMSoftware.TreeSize.Free")
- $WPFInstalltreesize.IsChecked = $false
- }
- If ( $WPFInstallvisualstudio.IsChecked -eq $true ) {
- $wingetinstall.Add("Microsoft.VisualStudio.2022.Community")
- $WPFInstallvisualstudio.IsChecked = $false
- }
- If ( $WPFInstallvivaldi.IsChecked -eq $true ) {
- $wingetinstall.Add("VivaldiTechnologies.Vivaldi")
- $WPFInstallvivaldi.IsChecked = $false
- }
- If ( $WPFInstallvoicemeeter.IsChecked -eq $true ) {
- $wingetinstall.Add("VB-Audio.Voicemeeter")
- $WPFInstallvoicemeeter.IsChecked = $false
- }
- If ( $WPFInstallwindirstat.IsChecked -eq $true ) {
- $wingetinstall.Add("WinDirStat.WinDirStat")
- $WPFInstallwindirstat.IsChecked = $false
- }
- If ( $WPFInstallwiztree.IsChecked -eq $true ) {
- $wingetinstall.Add("AntibodySoftware.WizTree")
- $WPFInstallwiztree.IsChecked = $false
- }
- If ( $WPFInstallwireshark.IsChecked -eq $true ) {
- $wingetinstall.Add("WiresharkFoundation.Wireshark")
- $WPFInstallwireshark.IsChecked = $false
- }
- If ( $WPFInstallsimplewall.IsChecked -eq $true ) {
- $wingetinstall.Add("Henry++.simplewall")
- $WPFInstallsimplewall.IsChecked = $false
- }
- If ( $WPFInstallzoom.IsChecked -eq $true ) {
- $wingetinstall.Add("Zoom.Zoom")
- $WPFInstallzoom.IsChecked = $false
- }
- If ( $WPFInstallviber.IsChecked -eq $true ) {
- $wingetinstall.Add("Viber.Viber")
- $WPFInstallviber.IsChecked = $false
- }
- If ( $WPFInstalltwinkletray.IsChecked -eq $true ) {
- $wingetinstall.Add("xanderfrangos.twinkletray")
- $WPFInstalltwinkletray.IsChecked = $false
- }
- # Fall 2022 Additions
- If ( $WPFInstallshell.IsChecked -eq $true ) {
- $wingetinstall.Add("Nilesoft.Shell")
- $WPFInstallshell.IsChecked = $false
- }
- If ( $WPFInstallklite.IsChecked -eq $true ) {
- $wingetinstall.Add("CodecGuide.K-LiteCodecPack.Standard")
- $WPFInstallklite.IsChecked = $false
- }
- If ( $WPFInstallsandboxie.IsChecked -eq $true ) {
- $wingetinstall.Add("Sandboxie.Plus")
- $WPFInstallsandboxie.IsChecked = $false
- }
- If ( $WPFInstallprocesslasso.IsChecked -eq $true ) {
- $wingetinstall.Add("BitSum.ProcessLasso")
- $WPFInstallprocesslasso.IsChecked = $false
- }
- If ( $WPFInstallwinmerge.IsChecked -eq $true ) {
- $wingetinstall.Add("WinMerge.WinMerge")
- $WPFInstallwinmerge.IsChecked = $false
- }
- If ( $WPFInstalldotnet3.IsChecked -eq $true ) {
- $wingetinstall.Add("Microsoft.DotNet.DesktopRuntime.3_1")
- $WPFInstalldotnet3.IsChecked = $false
- }
- If ( $WPFInstalldotnet5.IsChecked -eq $true ) {
- $wingetinstall.Add("Microsoft.DotNet.DesktopRuntime.5")
- $WPFInstalldotnet5.IsChecked = $false
- }
- If ( $WPFInstalldotnet6.IsChecked -eq $true ) {
- $wingetinstall.Add("Microsoft.DotNet.DesktopRuntime.6")
- $WPFInstalldotnet6.IsChecked = $false
- }
- If ( $WPFInstallvc2015_64.IsChecked -eq $true ) {
- $wingetinstall.Add("Microsoft.VC++2015-2022Redist-x64")
- $WPFInstallvc2015_64.IsChecked = $false
- }
- If ( $WPFInstallvc2015_32.IsChecked -eq $true ) {
- $wingetinstall.Add("Microsoft.VC++2015-2022Redist-x86")
- $WPFInstallvc2015_32.IsChecked = $false
- }
- If ( $WPFInstallfoxpdf.IsChecked -eq $true ) {
- $wingetinstall.Add("Foxit.PhantomPDF")
- $WPFInstallfoxpdf.IsChecked = $false
- }
- If ( $WPFInstallonlyoffice.IsChecked -eq $true ) {
- $wingetinstall.Add("ONLYOFFICE.DesktopEditors")
- $WPFInstallonlyoffice.IsChecked = $false
- }
- If ( $WPFInstallflux.IsChecked -eq $true ) {
- $wingetinstall.Add("flux.flux")
- $WPFInstallflux.IsChecked = $false
- }
- If ( $WPFInstallitunes.IsChecked -eq $true ) {
- $wingetinstall.Add("Apple.iTunes")
- $WPFInstallitunes.IsChecked = $false
- }
- If ( $WPFInstallcider.IsChecked -eq $true ) {
- $wingetinstall.Add("CiderCollective.Cider")
- $WPFInstallcider.IsChecked = $false
- }
- If ( $WPFInstalljoplin.IsChecked -eq $true ) {
- $wingetinstall.Add("Joplin.Joplin")
- $WPFInstalljoplin.IsChecked = $false
- }
- If ( $WPFInstallopenoffice.IsChecked -eq $true ) {
- $wingetinstall.Add("Apache.OpenOffice")
- $WPFInstallopenoffice.IsChecked = $false
- }
- If ( $WPFInstallrustdesk.IsChecked -eq $true ) {
- $wingetinstall.Add("RustDesk.RustDesk")
- $WPFInstallrustdesk.IsChecked = $false
- }
- If ( $WPFInstalljami.IsChecked -eq $true ) {
- $wingetinstall.Add("SFLinux.Jami")
- $WPFInstalljami.IsChecked = $false
- }
- If ( $WPFInstalljdownloader.IsChecked -eq $true ) {
- $wingetinstall.Add("AppWork.JDownloader")
- $WPFInstalljdownloader.IsChecked = $false
- }
+ $WingetInstall = Get-CheckBoxes -Group "WPFInstall"
+
# Check if winget is installed
Write-Host "Checking if Winget is Installed..."
if (Test-Path ~\AppData\Local\Microsoft\WindowsApps\winget.exe) {
@@ -563,7 +193,7 @@ $WPFinstall.Add_Click({
# Switching to winget-install from PSGallery from asheroto
# Source: https://github.com/asheroto/winget-installer
- Start-Process powershell.exe -Verb RunAs -ArgumentList "-command irm https://raw.githubusercontent.com/asheroto/winget-installer/master/winget-install.ps1 | iex | Out-Host" -WindowStyle Normal
+ Start-Process powershell.exe -Verb RunAs -ArgumentList "-command irm https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/winget.ps1 | iex | Out-Host" -WindowStyle Normal
}
elseif (((Get-ComputerInfo).WindowsVersion) -lt "1809") {
@@ -587,14 +217,14 @@ $WPFinstall.Add_Click({
}
# Install all winget programs in new window
- $wingetinstall.ToArray()
+ #$wingetinstall.ToArray()
# Define Output variable
$wingetResult = New-Object System.Collections.Generic.List[System.Object]
foreach ( $node in $wingetinstall ) {
try {
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command winget install -e --accept-source-agreements --accept-package-agreements --silent $node | Out-Host" -WindowStyle Normal
$wingetResult.Add("$node`n")
- Start-Sleep -s 3
+ Start-Sleep -s 6
Wait-Process winget -Timeout 90 -ErrorAction SilentlyContinue
}
catch [System.InvalidOperationException] {
@@ -730,14 +360,6 @@ $WPFminimal.Add_Click({
$WPFtweaksbutton.Add_Click({
- If ( $WPFEssTweaksDVR.IsChecked -eq $true ) {
- #Installing PowerRun to edit some restricted registry keys (Need this to disable Gamebar Presence Writer)
- curl.exe -s "https://www.sordum.org/files/download/power-run/PowerRun.zip" -o ".\PowerRun.zip"
- Expand-Archive -Path ".\PowerRun.zip" -DestinationPath ".\" -Force
- Copy-Item -Path ".\PowerRun\PowerRun.exe" -Destination "$env:windir" -Force
- Remove-Item -Path ".\PowerRun\", ".\PowerRun.zip" -Recurse
- }
-
If ( $WPFEssTweaksAH.IsChecked -eq $true ) {
Write-Host "Disabling Activity History..."
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "EnableActivityFeed" -Type DWord -Value 0
@@ -771,12 +393,9 @@ $WPFtweaksbutton.Add_Click({
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Force
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Name "AllowGameDVR" -Type DWord -Value 0
-
- #Disabling Gamebar Presence Writer, which causes stutter in games
- PowerRun.exe /SW:0 Powershell.exe -command { Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Gaming.GameBar.PresenceServer.Internal.PresenceWriter" -Name "ActivationType" -Type DWord -Value 0 }
-
$WPFEssTweaksDVR.IsChecked = $false
}
+
If ( $WPFEssTweaksHiber.IsChecked -eq $true ) {
Write-Host "Disabling Hibernation..."
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Session Manager\Power" -Name "HibernateEnabled" -Type Dword -Value 0
@@ -838,11 +457,43 @@ $WPFtweaksbutton.Add_Click({
New-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" -Name "InprocServer32" -force -value ""
$WPFMiscTweaksRightClickMenu.IsChecked = $false
}
+ If ( $WPFchangedns.text -eq 'Google' ) {
+ Write-Host "Setting DNS to Google for all connections..."
+ $DC = "8.8.8.8"
+ $Internet = "8.8.4.4"
+ $dns = "$DC", "$Internet"
+ $Interface = Get-WmiObject Win32_NetworkAdapterConfiguration
+ $Interface.SetDNSServerSearchOrder($dns) | Out-Null
+ }
+ If ( $WPFchangedns.text -eq 'Cloud Flare' ) {
+ Write-Host "Setting DNS to Cloud Flare for all connections..."
+ $DC = "1.1.1.1"
+ $Internet = "1.0.0.1"
+ $dns = "$DC", "$Internet"
+ $Interface = Get-WmiObject Win32_NetworkAdapterConfiguration
+ $Interface.SetDNSServerSearchOrder($dns) | Out-Null
+ }
+ If ( $WPFchangedns.text -eq 'Level3' ) {
+ Write-Host "Setting DNS to Level3 for all connections..."
+ $DC = "4.2.2.2"
+ $Internet = "4.2.2.1"
+ $dns = "$DC", "$Internet"
+ $Interface = Get-WmiObject Win32_NetworkAdapterConfiguration
+ $Interface.SetDNSServerSearchOrder($dns) | Out-Null
+ }
+ If ( $WPFchangedns.text -eq 'Open DNS' ) {
+ Write-Host "Setting DNS to Open DNS for all connections..."
+ $DC = "208.67.222.222"
+ $Internet = "208.67.220.220"
+ $dns = "$DC", "$Internet"
+ $Interface = Get-WmiObject Win32_NetworkAdapterConfiguration
+ $Interface.SetDNSServerSearchOrder($dns) | Out-Null
+ }
If ( $WPFEssTweaksOO.IsChecked -eq $true ) {
If (!(Test-Path .\ooshutup10.cfg)) {
Write-Host "Running O&O Shutup with Recommended Settings"
- curl.exe -ss "https://raw.githubusercontent.com/ChrisTitusTech/win10script/master/ooshutup10.cfg" -o ooshutup10.cfg
- curl.exe -ss "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe" -o OOSU10.exe
+ curl.exe -s "https://raw.githubusercontent.com/ChrisTitusTech/win10script/master/ooshutup10.cfg" -o ooshutup10.cfg
+ curl.exe -s "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe" -o OOSU10.exe
}
./OOSU10.exe ooshutup10.cfg /quiet
$WPFEssTweaksOO.IsChecked = $false
@@ -1065,7 +716,7 @@ $WPFtweaksbutton.Add_Click({
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type DWord -Value 1
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "AutoEndTasks" -Type DWord -Value 1
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "ClearPageFileAtShutdown" -Type DWord -Value 0
- Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseHoverTime" -Type DWord -Value 10
+ Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseHoverTime" -Type DWord -Value 400
## Timeout Tweaks cause flickering on Windows now
Remove-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "WaitToKillAppTimeout" -ErrorAction SilentlyContinue
@@ -1187,6 +838,20 @@ $WPFtweaksbutton.Add_Click({
Write-Host "Adjusted visual effects for performance"
$WPFMiscTweaksDisplay.IsChecked = $false
}
+ If ( $WPFMiscTweaksDisableMouseAcceleration.IsChecked -eq $true ) {
+ Write-Host "Disabling mouse acceleration..."
+ Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseSpeed" -Type String -Value 0
+ Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseThreshold1" -Type String -Value 0
+ Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseThreshold2" -Type String -Value 0
+ $WPFMiscTweaksDisableMouseAcceleration.IsChecked = $false
+ }
+ If ( $WPFMiscTweaksEnableMouseAcceleration.IsChecked -eq $true ) {
+ Write-Host "Enabling mouse acceleration..."
+ Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseSpeed" -Type String -Value 1
+ Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseThreshold1" -Type String -Value 6
+ Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseThreshold2" -Type String -Value 10
+ $WPFMiscTweaksEnableMouseAcceleration.IsChecked = $false
+ }
If ( $WPFEssTweaksRemoveCortana.IsChecked -eq $true ) {
Write-Host "Removing Cortana..."
Get-AppxPackage -allusers Microsoft.549981C3F5F10 | Remove-AppxPackage
@@ -1384,19 +1049,35 @@ $WPFtweaksbutton.Add_Click({
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
})
+
+$WPFAddUltPerf.Add_Click({
+ Write-Host "Adding Ultimate Performance Profile"
+ powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61
+ Write-Host "Profile added"
+ }
+)
+$WPFRemoveUltPerf.Add_Click({
+ Write-Host "Removing Ultimate Performance Profile"
+ powercfg -delete e9a42b02-d5df-448d-aa00-03f14749eb61
+ Write-Host "Profile Removed"
+ }
+)
+
$WPFEnableDarkMode.Add_Click({
Write-Host "Enabling Dark Mode"
$Theme = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
Set-ItemProperty $Theme AppsUseLightTheme -Value 0
+ Set-ItemProperty $Theme SystemUsesLightTheme -Value 0
Write-Host "Enabled"
}
)
-
+
$WPFDisableDarkMode.Add_Click({
Write-Host "Disabling Dark Mode"
$Theme = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
Set-ItemProperty $Theme AppsUseLightTheme -Value 1
+ Set-ItemProperty $Theme SystemUsesLightTheme -Value 1
Write-Host "Disabled"
}
)
@@ -1540,9 +1221,6 @@ $WPFundoall.Add_Click({
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Feeds" -Name "ShellFeedsTaskbarViewMode" -Type DWord -Value 0
Write-Host "Done - Reverted to Stock Settings"
- #Enable Gamebar Presence Writer
- PowerRun.exe /SW:0 Powershell.exe -command { Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Gaming.GameBar.PresenceServer.Internal.PresenceWriter" -Name "ActivationType" -Type DWord -Value 1 }
-
Write-Host "Essential Undo Completed"
$ButtonType = [System.Windows.MessageBoxButton]::OK
@@ -1855,4 +1533,5 @@ $WPFUpdatessecurity.Add_Click({
#===========================================================================
# Shows the form
#===========================================================================
+Get-FormVariables
$Form.ShowDialog() | out-null