mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-22 05:51:30 -06:00
Test 12 2022 - Big Foundational Update (#637)
* Fix of the unit tests (#468) * fix pester tests * fix function (#467) * Cherry pick and fix helper script * remove admin check and disable * Trim Trailing Whitespace (#472) Co-authored-by: Chris Titus <contact@christitus.com> * Better .gitignore (#473) * add progress and add wait to start-process (#475) * Fixed Cloudflare Naming (#504) * Update winutil.ps1 * Update MainWindow.xaml * Update check for Chocolatey (#520) * Update winutil.ps1 * Update check for Chocolatey Let user decide if he wants to install Chocolatey * Update winutil.ps1 (#525) Migrate to Switch-Tab function * Update winutil.ps1 (#531) Changes to "DiagTrack" service. * add responsive winget installs (#540) * add responsive winget installs * Update winutil.ps1 fix typo * remove no longer used paramater * add golang, an installation option in development list (#542) * Updated winget functions (#543) * update functions * Update winutil.ps1 forgot triple quotes * Update winutil.ps1 fixed vscode using wrong double quotes * Functions and error handling (#552) * move winget install to function and exception * updated winget upgrade to new install process * add logging to update * choco to function and write-output to ensure logs * update error handling * revert write-host and add invoke-runspace * Added runspace to load configs in background * fix unit tests * update pester tests * update pester * update pester * update pester * updated tweaks config to use WPF variable name * Fix data type of MouseHoverTime (#568) Setting Computer\HKEY_CURRENT_USER\Control Panel\Mouse\MouseHoverTime needs to be REG_SZ instead of REG_DWORD. With the wrong type the Taskbar and the Start Menu become hard to use because everything pops up instantly, probably because it's then treated as a 0 ms delay. * fix restore launch to quick access & OOSU10 download (#565) * Fix grammar (#577) * Update MainWindow.xaml * Update MainWindow-runspace.xaml * fix enable numlock after startup (#580) * Update README.md (#616) Added DNS provider into readme * Fix O&O ShutUp10 disabling app notifications and hide search box (#630) * Add files via upload Added ooshutup10_winutil_settings and fix the issue where OOSU10 disable app notifications and hide search box in windows. * Update winutil.ps1 Change ooshut10.cfg to ooshutup10_winutil_settings.cfg and fix the issues in https://github.com/ChrisTitusTech/winutil/issues/629 Now when apply the tweaks by O&O ShutUp10, will keep search box and notifications will not be disabled. * Update winutil.ps1 * Update winutil.ps1 --------- Co-authored-by: Chris Titus <contact@christitus.com> * Create ooshutup10_winutil_settings.cfg * Feature/tweakstofunctions (#576) * add functions for services * Move WPFEssTweaksDVR to function * Add invoke script and moved temp files * WPFEssTweaksHiber and formatting * WPFEssTweaksHiber * WPFEssTweaksHome and service * WPFEssTweaksLoc * TPMCheck * WPFEssTweaksDiskCleanup * Add error handling for invoke script * grammer * UAC and tweaks * WPFMiscTweaksDisableNotifications * WPFMiscTweaksRightClickMenu * Added DNS configuration + Reset to DHCP * WPFEssTweaksOO * WPFEssTweaksRP * WPFEssTweaksServices * WPFEssTweaksStorage * WPFEssTweaksTele * WPFEssTweaksWifi * WPFMiscTweaksLapPower * WPFMiscTweaksLapNum * WPFMiscTweaksPower * WPFMiscTweaksNum * WPFMiscTweaksExt * WPFMiscTweaksUTC * WPFMiscTweaksDisplay * Mouse Acceleration * WPFEssTweaksRemoveCortana * WPFEssTweaksDeBloat * set teaks to get checkboxes and loop * remove isdev * add help documentation * Add Quad 9 for #532 and #416 * remove isdev * Update tweaks.json Remove-ItemProperty is no longer needed as this was a bug from a bad commit 4 months ago. --------- Co-authored-by: Chris Titus <contact@christitus.com> * Tweak bingsearch (#620) * add functions for services * Move WPFEssTweaksDVR to function * Add invoke script and moved temp files * WPFEssTweaksHiber and formatting * WPFEssTweaksHiber * WPFEssTweaksHome and service * WPFEssTweaksLoc * TPMCheck * WPFEssTweaksDiskCleanup * Add error handling for invoke script * grammer * UAC and tweaks * WPFMiscTweaksDisableNotifications * WPFMiscTweaksRightClickMenu * Added DNS configuration + Reset to DHCP * WPFEssTweaksOO * WPFEssTweaksRP * WPFEssTweaksServices * WPFEssTweaksStorage * WPFEssTweaksTele * WPFEssTweaksWifi * WPFMiscTweaksLapPower * WPFMiscTweaksLapNum * WPFMiscTweaksPower * WPFMiscTweaksNum * WPFMiscTweaksExt * WPFMiscTweaksUTC * WPFMiscTweaksDisplay * Mouse Acceleration * WPFEssTweaksRemoveCortana * WPFEssTweaksDeBloat * set teaks to get checkboxes and loop * remove isdev * add help documentation * Add Quad 9 for #532 and #416 * remove isdev * Update helper script and add tweak * update changes * Refactor/runspaces (#626) * modify runspace.ps1 to compile * update compiler to include warning * unit test * implement invoke-button and naming standard * naming standard * fix winutil tests * update functions * add version number * fix codeowners * fix import * undo tweaks now pull from config * pester test * Compile Winutil * python and oo cfg -fix python 3 to 3.11 -fix o&o shutup cfg -enable dev mode for testing * Force install missing winget Fix method for winget install on any system. * Deluge Addition * Feature/impex (#619) * add functions for services * Move WPFEssTweaksDVR to function * Add invoke script and moved temp files * WPFEssTweaksHiber and formatting * WPFEssTweaksHiber * WPFEssTweaksHome and service * WPFEssTweaksLoc * TPMCheck * WPFEssTweaksDiskCleanup * Add error handling for invoke script * grammer * UAC and tweaks * WPFMiscTweaksDisableNotifications * WPFMiscTweaksRightClickMenu * Added DNS configuration + Reset to DHCP * WPFEssTweaksOO * WPFEssTweaksRP * WPFEssTweaksServices * WPFEssTweaksStorage * WPFEssTweaksTele * WPFEssTweaksWifi * WPFMiscTweaksLapPower * WPFMiscTweaksLapNum * WPFMiscTweaksPower * WPFMiscTweaksNum * WPFMiscTweaksExt * WPFMiscTweaksUTC * WPFMiscTweaksDisplay * Mouse Acceleration * WPFEssTweaksRemoveCortana * WPFEssTweaksDeBloat * set teaks to get checkboxes and loop * remove isdev * add help documentation * Add Quad 9 for #532 and #416 * remove isdev * Working Import and Export * Add null check * Remove IsDev * sync with test * redo impex * Irm runspace fix (#635) * Update runspace.ps1 * Update start.ps1 * compiled for testing * Compile Winutil * Compile Winutil * test * disable runspace build * test * change compile to ascii * change compile to winutil * Compile Winutil * Delete MainWindow.xaml * Update release.yaml runspace merge job * remove update branch --------- Co-authored-by: DeveloperDurp <developerdurp@durp.info> Co-authored-by: Carter <60557606+Carterpersall@users.noreply.github.com> Co-authored-by: Jacobtread <33708767+jacobtread@users.noreply.github.com> Co-authored-by: jstok84 <jstok84@gmail.com> Co-authored-by: WolfBungalow <irtwit@gmail.com> Co-authored-by: Ankit Yadav <52023083+4nkitd@users.noreply.github.com> Co-authored-by: Starfiresg1 <Starfiresg1@users.noreply.github.com> Co-authored-by: Adrián Insaurralde Avalos <36372335+adrianinsaval@users.noreply.github.com> Co-authored-by: Hyperio <96462198+hyperio546@users.noreply.github.com> Co-authored-by: dennyamarojr <36896116+dennyamarojr@users.noreply.github.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
This commit is contained in:
parent
5c8c2f3442
commit
a1c7501b98
59
.github/CODEOWNERS
vendored
Normal file
59
.github/CODEOWNERS
vendored
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
# This is a comment.
|
||||||
|
# Each line is a file pattern followed by one or more owners.
|
||||||
|
|
||||||
|
# These owners will be the default owners for everything in
|
||||||
|
# the repo. Unless a later match takes precedence,
|
||||||
|
# @global-owner1 and @global-owner2 will be requested for
|
||||||
|
# review when someone opens a pull request.
|
||||||
|
* @ChrisTitusTech
|
||||||
|
|
||||||
|
# Order is important; the last matching pattern takes the most
|
||||||
|
# precedence. When someone opens a pull request that only
|
||||||
|
# modifies JS files, only @js-owner and not the global
|
||||||
|
# owner(s) will be requested for a review.
|
||||||
|
# *.js @js-owner #This is an inline comment.
|
||||||
|
|
||||||
|
# You can also use email addresses if you prefer. They'll be
|
||||||
|
# used to look up users just like we do for commit author
|
||||||
|
# emails.
|
||||||
|
# *.go docs@example.com
|
||||||
|
|
||||||
|
# Teams can be specified as code owners as well. Teams should
|
||||||
|
# be identified in the format @org/team-name. Teams must have
|
||||||
|
# explicit write access to the repository. In this example,
|
||||||
|
# the octocats team in the octo-org organization owns all .txt files.
|
||||||
|
# *.txt @octo-org/octocats
|
||||||
|
|
||||||
|
# In this example, @doctocat owns any files in the build/logs
|
||||||
|
# directory at the root of the repository and any of its
|
||||||
|
# subdirectories.
|
||||||
|
# /build/logs/ @doctocat
|
||||||
|
|
||||||
|
# The `docs/*` pattern will match files like
|
||||||
|
# `docs/getting-started.md` but not further nested files like
|
||||||
|
# `docs/build-app/troubleshooting.md`.
|
||||||
|
# docs/* docs@example.com
|
||||||
|
|
||||||
|
# In this example, @octocat owns any file in an apps directory
|
||||||
|
# anywhere in your repository.
|
||||||
|
# apps/ @octocat
|
||||||
|
|
||||||
|
# In this example, @doctocat owns any file in the `/docs`
|
||||||
|
# directory in the root of your repository and any of its
|
||||||
|
# subdirectories.
|
||||||
|
# /docs/ @doctocat
|
||||||
|
|
||||||
|
# In this example, any change inside the `/scripts` directory
|
||||||
|
# will require approval from @doctocat or @octocat.
|
||||||
|
# /scripts/ @doctocat @octocat
|
||||||
|
|
||||||
|
# In this example, @octocat owns any file in a `/logs` directory such as
|
||||||
|
# `/build/logs`, `/scripts/logs`, and `/deeply/nested/logs`. Any changes
|
||||||
|
# in a `/logs` directory will require approval from @octocat.
|
||||||
|
# **/logs @octocat
|
||||||
|
|
||||||
|
# In this example, @octocat owns any file in the `/apps`
|
||||||
|
# directory in the root of your repository except for the `/apps/github`
|
||||||
|
# subdirectory, as its owners are left empty.
|
||||||
|
# /apps/ @octocat
|
||||||
|
# /apps/github
|
13
.github/workflows/release.yaml
vendored
13
.github/workflows/release.yaml
vendored
@ -4,21 +4,18 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- test
|
- test*
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-runspace:
|
||||||
runs-on: ubuntu-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.head_ref }}
|
ref: ${{ github.head_ref }}
|
||||||
- name: Create local changes
|
- name: Create local changes
|
||||||
run: |
|
run: |
|
||||||
sed -i "/\$BranchToUse = /c\$BranchToUse = '$GITHUB_REF_NAME'" $GITHUB_WORKSPACE/runspace.ps1
|
powershell.exe -f Compile.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
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
with:
|
with:
|
||||||
commit_message: Update Branch in script
|
commit_message: Compile Winutil
|
13
.github/workflows/unittests.yaml
vendored
13
.github/workflows/unittests.yaml
vendored
@ -4,6 +4,19 @@ on:
|
|||||||
push:
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: PS Script Analyzer
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: lint
|
||||||
|
uses: devblackops/github-action-psscriptanalyzer@master
|
||||||
|
with:
|
||||||
|
sendComment: false
|
||||||
|
settingsPath: lint/PSScriptAnalyser.ps1
|
||||||
|
failOnErrors: false
|
||||||
|
failOnWarnings: false
|
||||||
|
failOnInfos: false
|
||||||
test:
|
test:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
|
43
.gitignore
vendored
43
.gitignore
vendored
@ -1,15 +1,38 @@
|
|||||||
|
### VSCode ###
|
||||||
|
|
||||||
ooshutup10.cfg
|
# Configuration folder
|
||||||
OOSU10.exe
|
.vscode/
|
||||||
|
|
||||||
|
### Visual Studio ###
|
||||||
|
|
||||||
|
# Visual Studio user-specific files
|
||||||
|
.vs/
|
||||||
|
|
||||||
|
winutil.pdb
|
||||||
|
|
||||||
|
### Windows ###
|
||||||
|
|
||||||
|
# Folder config file
|
||||||
|
[Dd]esktop.ini
|
||||||
|
|
||||||
|
# Executables and Configs
|
||||||
*.exe
|
*.exe
|
||||||
|
winget.msixbundle
|
||||||
|
pester.ps1
|
||||||
|
*.psd*
|
||||||
|
ooshutup10.cfg
|
||||||
|
winutil.exe.config
|
||||||
|
Microsoft.UI.Xaml*
|
||||||
|
license1.xml
|
||||||
|
|
||||||
|
# Libraries
|
||||||
System.Management.Automation.dll
|
System.Management.Automation.dll
|
||||||
Microsoft.PowerShell.ConsoleHost.dll
|
Microsoft.PowerShell.ConsoleHost.dll
|
||||||
winutil.exe.config
|
|
||||||
winutil.pdb
|
# Compressed files
|
||||||
*.zip
|
*.zip
|
||||||
.vs/
|
|
||||||
*.psd*
|
### MacOS ###
|
||||||
pester.ps1
|
|
||||||
Microsoft.UI.Xaml*
|
# General
|
||||||
winget.msixbundle
|
.DS_Store
|
||||||
license1.xml
|
|
33
Compile.ps1
Normal file
33
Compile.ps1
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
$OFS = "`r`n"
|
||||||
|
$scriptname = "winutil.ps1"
|
||||||
|
|
||||||
|
|
||||||
|
Remove-Item .\$scriptname
|
||||||
|
|
||||||
|
Write-output '
|
||||||
|
################################################################################################################
|
||||||
|
### ###
|
||||||
|
### WARNING: This file is automatically generated DO NOT modify this file directly as it will be overwritten ###
|
||||||
|
### ###
|
||||||
|
################################################################################################################
|
||||||
|
' | Out-File ./$scriptname -Append -Encoding ascii
|
||||||
|
|
||||||
|
(Get-Content .\scripts\start.ps1).replace('#{replaceme}',"$(get-date -format yy.MM.dd)") | Out-File ./$scriptname -Append -Encoding ascii
|
||||||
|
|
||||||
|
Get-ChildItem .\functions -Recurse -File | ForEach-Object {
|
||||||
|
Get-Content $psitem.FullName | Out-File ./$scriptname -Append -Encoding ascii
|
||||||
|
}
|
||||||
|
|
||||||
|
Get-ChildItem .\xaml | ForEach-Object {
|
||||||
|
$xaml = (Get-Content $psitem.FullName).replace("'","''")
|
||||||
|
|
||||||
|
Write-output "`$$($psitem.BaseName) = '$xaml'" | Out-File ./$scriptname -Append -Encoding ascii
|
||||||
|
}
|
||||||
|
|
||||||
|
Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach-Object {
|
||||||
|
$json = (Get-Content $psitem.FullName).replace("'","''")
|
||||||
|
|
||||||
|
Write-output "`$sync.configs.$($psitem.BaseName) = '$json' `| convertfrom-json" | Out-File ./$scriptname -Append -Encoding ascii
|
||||||
|
}
|
||||||
|
|
||||||
|
Get-Content .\scripts\main.ps1 | Out-File ./$scriptname -Append -Encoding ascii
|
@ -1,305 +0,0 @@
|
|||||||
<Window x:Class="WinUtility.MainWindow"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:local="clr-namespace:WinUtility"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
Background="#777777"
|
|
||||||
WindowStartupLocation="CenterScreen"
|
|
||||||
Title="Chris Titus Tech's Windows Utility" Height="800" Width="1200">
|
|
||||||
<Border Name="dummy" Grid.Column="0" Grid.Row="0">
|
|
||||||
<Viewbox Stretch="Uniform" VerticalAlignment="Top">
|
|
||||||
<Grid Background="#777777" ShowGridLines="False" Name="MainGrid">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height=".1*"/>
|
|
||||||
<RowDefinition Height=".9*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<DockPanel Background="#777777" SnapsToDevicePixels="True" Grid.Row="0" Width="1100">
|
|
||||||
<Image Height="50" Width="100" Name="Icon" SnapsToDevicePixels="True" Source="https://christitus.com/images/logo-full.png" Margin="0,10,0,10"/>
|
|
||||||
<Button Content="Install" HorizontalAlignment="Left" Height="40" Width="100" Background="#222222" BorderThickness="0,0,0,0" FontWeight="Bold" Foreground="#ffffff" Name="Tab1BT"/>
|
|
||||||
<Button Content="Tweaks" HorizontalAlignment="Left" Height="40" Width="100" Background="#333333" BorderThickness="0,0,0,0" FontWeight="Bold" Foreground="#ffffff" Name="Tab2BT"/>
|
|
||||||
<Button Content="Config" HorizontalAlignment="Left" Height="40" Width="100" Background="#444444" BorderThickness="0,0,0,0" FontWeight="Bold" Foreground="#ffffff" Name="Tab3BT"/>
|
|
||||||
<Button Content="Updates" HorizontalAlignment="Left" Height="40" Width="100" Background="#555555" BorderThickness="0,0,0,0" FontWeight="Bold" Foreground="#ffffff" Name="Tab4BT"/>
|
|
||||||
</DockPanel>
|
|
||||||
<TabControl Grid.Row="1" Padding="-1" Name="TabNav" Background="#222222">
|
|
||||||
<TabItem Header="Install" Visibility="Collapsed" Name="Tab1">
|
|
||||||
<Grid Background="#222222">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Column="0" Margin="10">
|
|
||||||
<Label Content="Browsers" FontSize="16" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installbrave" Content="Brave" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installchrome" Content="Chrome" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installchromium" Content="Chromium" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installfirefox" Content="Firefox" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installlibrewolf" Content="LibreWolf" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installtor" Content="Tor Browser" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installvivaldi" Content="Vivaldi" Margin="5,0"/>
|
|
||||||
|
|
||||||
|
|
||||||
<Label Content="Communications" FontSize="16" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installdiscord" Content="Discord" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installhexchat" Content="Hexchat" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installjami" Content="Jami" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installmatrix" Content="Matrix" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installsignal" Content="Signal" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installskype" Content="Skype" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installslack" Content="Slack" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installteams" Content="Teams" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installviber" Content="Viber" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installzoom" Content="Zoom" Margin="5,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Column="1" Margin="10">
|
|
||||||
<Label Content="Development" FontSize="16" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installatom" Content="Atom" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installgit" Content="Git" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installgithubdesktop" Content="GitHub Desktop" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installjava8" Content="OpenJDK Java 8" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installjava16" Content="OpenJDK Java 16" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installjava18" Content="Oracle Java 18" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installjetbrains" Content="Jetbrains Toolbox" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installnodejs" Content="NodeJS" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installnodejslts" Content="NodeJS LTS" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installpython3" Content="Python3" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installrustlang" Content="Rust" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installsublime" Content="Sublime" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installvisualstudio" Content="Visual Studio 2022" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installvscode" Content="VS Code" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installvscodium" Content="VS Codium" Margin="5,0"/>
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Column="2" Margin="10">
|
|
||||||
|
|
||||||
<Label Content="Document" FontSize="16" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installadobe" Content="Adobe Reader DC" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installfoxpdf" Content="Foxit PDF" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installjoplin" Content="Joplin (FOSS Notes)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installlibreoffice" Content="LibreOffice" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installnotepadplus" Content="Notepad++" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installobsidian" Content="Obsidian" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installonlyoffice" Content="ONLYOffice Desktop" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installopenoffice" Content="Apache OpenOffice" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installsumatra" Content="Sumatra PDF" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installwinmerge" Content="WinMerge" Margin="5,0"/>
|
|
||||||
|
|
||||||
<Label Content="Games" FontSize="16" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installepicgames" Content="Epic Games Launcher" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installgog" Content="GOG Galaxy" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installsteam" Content="Steam" Margin="5,0"/>
|
|
||||||
|
|
||||||
<Label Content="Pro Tools" FontSize="16" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installadvancedip" Content="Advanced IP Scanner" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installmremoteng" Content="mRemoteNG" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installputty" Content="Putty" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installrustdesk" Content="Rust Remote Desktop (FOSS)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installsimplewall" Content="SimpleWall" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installscp" Content="WinSCP" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installwireshark" Content="WireShark" Margin="5,0"/>
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Column="3" Margin="10">
|
|
||||||
<Label Content="Microsoft Tools" FontSize="16" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installdotnet3" Content=".NET Desktop Runtime 3.1" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installdotnet5" Content=".NET Desktop Runtime 5" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installdotnet6" Content=".NET Desktop Runtime 6" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installpowertoys" Content="Microsoft Powertoys" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installvc2015_64" Content="Visual C++ 2015-2022 64-bit" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installvc2015_32" Content="Visual C++ 2015-2022 32-bit" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installterminal" Content="Windows Terminal" Margin="5,0"/>
|
|
||||||
|
|
||||||
<Label Content="Multimedia Tools" FontSize="16" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installaudacity" Content="Audacity" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installblender" Content="Blender (3D Graphics)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installcider" Content="Cider (FOSS Music Player)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installeartrumpet" Content="Eartrumpet (Audio)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installflameshot" Content="Flameshot (Screenshots)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installfoobar" Content="Foobar2000 (Music Player)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installgimp" Content="GIMP (Image Editor)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installgreenshot" Content="Greenshot (Screenshots)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installhandbrake" Content="HandBrake" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installimageglass" Content="ImageGlass (Image Viewer)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installinkscape" Content="Inkscape" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installitunes" Content="iTunes" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installkdenlive" Content="Kdenlive (Video Editor)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installklite" Content="K-Lite Codec Standard" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installmpc" Content="Media Player Classic (Video Player)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installobs" Content="OBS Studio" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installsharex" Content="ShareX (Screenshots)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installvlc" Content="VLC (Video Player)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installvoicemeeter" Content="Voicemeeter (Audio)" Margin="5,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Column="4" Margin="10">
|
|
||||||
<Label Content="Utilities" FontSize="16" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installsevenzip" Content="7-Zip" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installalacritty" Content="Alacritty Terminal" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installanydesk" Content="AnyDesk" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installautohotkey" Content="AutoHotkey" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installbitwarden" Content="Bitwarden" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installcpuz" Content="CPU-Z" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installetcher" Content="Etcher USB Creator" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installesearch" Content="Everything Search" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installflux" Content="f.lux Redshift" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installgpuz" Content="GPU-Z" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installglaryutilities" Content="Glary Utilities" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installhwinfo" Content="HWInfo" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installidm" Content="Internet Download Manager" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installjdownloader" Content="J Download Manager" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installkeepass" Content="KeePassXC" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installmalwarebytes" Content="MalwareBytes" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installnvclean" Content="NVCleanstall" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installprocesslasso" Content="Process Lasso" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installrevo" Content="RevoUninstaller" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installrufus" Content="Rufus Imager" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installsandboxie" Content="Sandboxie Plus" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installshell" Content="Shell (Expanded Context Menu)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installteamviewer" Content="TeamViewer" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installttaskbar" Content="Translucent Taskbar" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installtreesize" Content="TreeSize Free" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installtwinkletray" Content="Twinkle Tray" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installwindirstat" Content="WinDirStat" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Installwiztree" Content="WizTree" Margin="5,0"/>
|
|
||||||
<Button Name="install" Background="AliceBlue" Content="Start Install" Margin="20,5,20,5" ToolTip="Install all checked programs"/>
|
|
||||||
<Button Name="InstallUpgrade" Background="AliceBlue" Content="Upgrade Installs" Margin="20,5,20,5" ToolTip="Upgrade All Existing Programs on System"/>
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</TabItem>
|
|
||||||
<TabItem Header="Tweaks" Visibility="Collapsed" Name="Tab2">
|
|
||||||
<Grid Background="#333333">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height=".10*"/>
|
|
||||||
<RowDefinition Height=".10*"/>
|
|
||||||
<RowDefinition Height=".80*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<StackPanel Background="#777777" Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Center" Grid.ColumnSpan="2" Margin="10">
|
|
||||||
<Label Content="Recommended Selections:" FontSize="17" VerticalAlignment="Center"/>
|
|
||||||
<Button Name="desktop" Content="Desktop" Margin="7"/>
|
|
||||||
<Button Name="laptop" Content="Laptop" Margin="7"/>
|
|
||||||
<Button Name="minimal" Content="Minimal" Margin="7"/>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Background="#777777" Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center" Grid.ColumnSpan="2" Margin="10">
|
|
||||||
<TextBlock Padding="10">
|
|
||||||
Note: Hover over items to get a better description. Please be careful as many of these tweaks will heavily modify your system.
|
|
||||||
<LineBreak/>Recommended selections are for normal users and if you are unsure do NOT check anything else!
|
|
||||||
</TextBlock>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Row="2" Grid.Column="0" Margin="10,5">
|
|
||||||
<Label FontSize="16" Content="Essential Tweaks"/>
|
|
||||||
<CheckBox Name="EssTweaksRP" Content="Create Restore Point" Margin="5,0" ToolTip="Creates a Windows Restore point before modifying system. Can use Windows System Restore to rollback to before tweaks were applied"/>
|
|
||||||
<CheckBox Name="EssTweaksOO" Content="Run OO Shutup" Margin="5,0" ToolTip="Runs OO Shutup from https://www.oo-software.com/en/shutup10"/>
|
|
||||||
<CheckBox Name="EssTweaksTele" Content="Disable Telemetry" Margin="5,0" ToolTip="Disables Microsoft Telemetry. Note: This will lock many Edge Browser settings. Microsoft spys heavily on you when using the Edge browser."/>
|
|
||||||
<CheckBox Name="EssTweaksWifi" Content="Disable Wifi-Sense" Margin="5,0" ToolTip="Wifi Sense is a spying service that phones home all nearby scaned wifi networks and your current geo location."/>
|
|
||||||
<CheckBox Name="EssTweaksAH" Content="Disable Activity History" Margin="5,0" ToolTip="This erases recent docs, clipboard, and run history."/>
|
|
||||||
<CheckBox Name="EssTweaksDeleteTempFiles" Content="Delete Temporary Files" Margin="5,0" ToolTip="Erases TEMP Folders"/>
|
|
||||||
<CheckBox Name="EssTweaksDiskCleanup" Content="Run Disk Cleanup" Margin="5,0" ToolTip="Runs Disk Cleanup on Drive C: and removes old Windows Updates."/>
|
|
||||||
<CheckBox Name="EssTweaksLoc" Content="Disable Location Tracking" Margin="5,0" ToolTip="Disables Location Tracking...DUH!"/>
|
|
||||||
<CheckBox Name="EssTweaksHome" Content="Disable Homegroup" Margin="5,0" ToolTip="Disables HomeGroup - Windows 11 doesn't have this, it was awful."/>
|
|
||||||
<CheckBox Name="EssTweaksStorage" Content="Disable Storage Sense" Margin="5,0" ToolTip="Storage Sense is supposed to delete temp files automatically, but often runs at weird times and mostly doesn't do much. Although when it was introduced in Win 10 (1809 Version) it deleted people's documents... So there is that."/>
|
|
||||||
<CheckBox Name="EssTweaksHiber" Content="Disable Hibernation" Margin="5,0" ToolTip="Hibernation is really meant for laptops as it saves what's in memory before turning the pc off. It really should never be used, but some people are lazy and rely on it. Don't be like Bob. Bob likes hibernation."/>
|
|
||||||
<CheckBox Name="EssTweaksDVR" Content="Disable GameDVR" Margin="5,0" ToolTip="GameDVR is a Windows App that is a dependancy for some Store Games. I've never met someone that likes it, but it's there for the XBOX crowd."/>
|
|
||||||
<CheckBox Name="EssTweaksServices" Content="Set Services to Manual" Margin="5,0" ToolTip="Turns a bunch of system services to manual that don't need to be running all the time. This is pretty harmless as if the service is needed, it will simply start on demand."/>
|
|
||||||
<Label Content="Dark Theme" />
|
|
||||||
<Button Name="EnableDarkMode" Background="AliceBlue" Content="Enable" Margin="60,0" />
|
|
||||||
<Button Name="DisableDarkMode" Background="AliceBlue" Content="Disable" Margin="60,0"/>
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Row="2" Grid.Column="1" Margin="10,5">
|
|
||||||
<Label FontSize="16" Content="Misc. Tweaks"/>
|
|
||||||
<CheckBox Name="MiscTweaksPower" Content="Disable Power Throttling" Margin="5,0" ToolTip="This is mainly for Laptops, It disables Power Throttling and will use more battery."/>
|
|
||||||
<CheckBox Name="MiscTweaksLapPower" Content="Enable Power Throttling" Margin="5,0" ToolTip="ONLY FOR LAPTOPS! Do not use on a desktop."/>
|
|
||||||
<CheckBox Name="MiscTweaksNum" Content="Enable NumLock on Startup" Margin="5,0" ToolTip="This creates a time vortex and send you back to the past... or it simply turns numlock on at startup"/>
|
|
||||||
<CheckBox Name="MiscTweaksLapNum" Content="Disable Numlock on Startup" Margin="5,0" ToolTip="Disables Numlock... Very useful when you are on a laptop WITHOUT 9-key and this fixes that issue when the numlock is enabled!"/>
|
|
||||||
<CheckBox Name="MiscTweaksExt" Content="Show File Extensions" Margin="5,0"/>
|
|
||||||
<CheckBox Name="MiscTweaksDisplay" Content="Set Display for Performance" Margin="5,0" ToolTip="Sets the system preferences to performance. You can do this manually with sysdm.cpl as well."/>
|
|
||||||
<CheckBox Name="MiscTweaksUTC" Content="Set Time to UTC (Dual Boot)" Margin="5,0" ToolTip="Essential for computers that are dual booting. Fixes the time sync with Linux Systems."/>
|
|
||||||
<CheckBox Name="MiscTweaksDisableUAC" Content="Disable UAC" Margin="5,0" ToolTip="Disables User Account Control. Only recommended for Expert Users."/>
|
|
||||||
<CheckBox Name="MiscTweaksDisableNotifications" Content="Disable Notification" Margin="5,0" ToolTip="Disables all Notifications"/>
|
|
||||||
<CheckBox Name="MiscTweaksDisableTPMCheck" Content="Disable TPM on Update" Margin="5,0" ToolTip="Add the Windows 11 Bypass for those that want to upgrade their Windows 10."/>
|
|
||||||
<CheckBox Name="EssTweaksDeBloat" Content="Remove ALL MS Store Apps" Margin="5,0" ToolTip="USE WITH CAUTION!!!!! This will remove ALL Microsoft store apps other than the essentials to make winget work. Games installed by MS Store ARE INCLUDED!"/>
|
|
||||||
<CheckBox Name="EssTweaksRemoveCortana" Content="Remove Cortana" Margin="5,0" ToolTip="Removes Cortana, but often breaks search... if you are a heavy windows search users, this is NOT recommended."/>
|
|
||||||
<CheckBox Name="EssTweaksRemoveEdge" Content="Remove Microsoft Edge" Margin="5,0" ToolTip="Removes MS Edge when it gets reinstalled by updates."/>
|
|
||||||
<CheckBox Name="MiscTweaksRightClickMenu" Content="Set Classic Right-Click Menu " Margin="5,0" ToolTip="Great Windows 11 tweak to bring back good context menus when right clicking things in explorer."/>
|
|
||||||
<CheckBox Name="MiscTweaksDisableMouseAcceleration" Content="Disable Mouse Acceleration" Margin="5,0" ToolTip="Disables the Enhance Pointer Precision setting."/>
|
|
||||||
<CheckBox Name="MiscTweaksEnableMouseAcceleration" Content="Enable Mouse Acceleration" Margin="5,0" ToolTip="Enables the Enhance Pointer Precision setting."/>
|
|
||||||
<Button Name="tweaksbutton" Background="AliceBlue" Content="Run Tweaks" Margin="20,10,20,0"/>
|
|
||||||
<Button Name="undoall" Background="AliceBlue" Content="Undo All Tweaks" Margin="20,5"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</TabItem>
|
|
||||||
<TabItem Header="Config" Visibility="Collapsed" Name="Tab3">
|
|
||||||
<Grid Background="#444444">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Column="0" Margin="10,5">
|
|
||||||
<Label Content="Features" FontSize="16"/>
|
|
||||||
<CheckBox Name="Featuresdotnet" Content="All .Net Framework (2,3,4)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Featureshyperv" Content="HyperV Virtualization" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Featureslegacymedia" Content="Legacy Media (WMP, DirectPlay)" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Featurenfs" Content="NFS - Network File System" Margin="5,0"/>
|
|
||||||
<CheckBox Name="Featurewsl" Content="Windows Subsystem for Linux" Margin="5,0"/>
|
|
||||||
<Button Name="FeatureInstall" FontSize="14" Background="AliceBlue" Content="Install Features" Margin="20,5,20,0" Padding="10"/>
|
|
||||||
<Label Content="Fixes" FontSize="16"/>
|
|
||||||
<Button Name="PanelAutologin" FontSize="14" Background="AliceBlue" Content="Set Up Autologin" Margin="20,5,20,0" Padding="10"/>
|
|
||||||
<Button Name="FixesUpdate" FontSize="14" Background="AliceBlue" Content="Reset Windows Update" Margin="20,5,20,0" Padding="10"/>
|
|
||||||
<Button Name="PanelDISM" FontSize="14" Background="AliceBlue" Content="System Corruption Scan" Margin="20,5,20,0" Padding="10"/>
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Column="1" Margin="10,5">
|
|
||||||
<Label Content="Legacy Windows Panels" FontSize="16"/>
|
|
||||||
<Button Name="Panelcontrol" FontSize="14" Background="AliceBlue" Content="Control Panel" Margin="20,5,20,5" Padding="10"/>
|
|
||||||
<Button Name="Panelnetwork" FontSize="14" Background="AliceBlue" Content="Network Connections" Margin="20,0,20,5" Padding="10"/>
|
|
||||||
<Button Name="Panelpower" FontSize="14" Background="AliceBlue" Content="Power Panel" Margin="20,0,20,5" Padding="10"/>
|
|
||||||
<Button Name="Panelsound" FontSize="14" Background="AliceBlue" Content="Sound Settings" Margin="20,0,20,5" Padding="10"/>
|
|
||||||
<Button Name="Panelsystem" FontSize="14" Background="AliceBlue" Content="System Properties" Margin="20,0,20,5" Padding="10"/>
|
|
||||||
<Button Name="Paneluser" FontSize="14" Background="AliceBlue" Content="User Accounts" Margin="20,0,20,5" Padding="10"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</TabItem>
|
|
||||||
<TabItem Header="Updates" Visibility="Collapsed" Name="Tab4">
|
|
||||||
<Grid Background="#555555">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Column="0" Margin="10,5">
|
|
||||||
<Button Name="Updatesdefault" FontSize="16" Background="AliceBlue" Content="Default (Out of Box) Settings" Margin="20,0,20,10" Padding="10"/>
|
|
||||||
<TextBlock Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This is the default settings that come with Windows. <LineBreak/><LineBreak/> No modifications are made and will remove any custom windows update settings.<LineBreak/><LineBreak/>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.</TextBlock>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Column="1" Margin="10,5">
|
|
||||||
<Button Name="Updatessecurity" FontSize="16" Background="AliceBlue" Content="Security (Recommended) Settings" Margin="20,0,20,10" Padding="10"/>
|
|
||||||
<TextBlock Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This is my recommended setting I use on all computers.<LineBreak/><LineBreak/> It will delay feature updates by 2 years and will install security updates 4 days after release.<LineBreak/><LineBreak/>Feature Updates: Adds features and often bugs to systems when they are released. You want to delay these as long as possible.<LineBreak/><LineBreak/>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.</TextBlock>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Column="2" Margin="10,5">
|
|
||||||
<Button Name="Updatesdisable" FontSize="16" Background="AliceBlue" Content="Disable ALL Updates (NOT RECOMMENDED!)" Margin="20,0,20,10" Padding="10,10,10,10"/>
|
|
||||||
<TextBlock Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This completely disables ALL Windows Updates and is NOT RECOMMENDED.<LineBreak/><LineBreak/> However, it can be suitable if you use your system for a select purpose and do not actively browse the internet. <LineBreak/><LineBreak/>Note: Your system will be easier to hack and infect without security updates.</TextBlock>
|
|
||||||
<TextBlock Text=" " Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300"/>
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</TabItem>
|
|
||||||
</TabControl>
|
|
||||||
</Grid>
|
|
||||||
</Viewbox>
|
|
||||||
</Border>
|
|
||||||
</Window>
|
|
@ -21,6 +21,7 @@ If you are having TLS 1.2 Issues or You cannot find or resolve `christitus.com/w
|
|||||||
```
|
```
|
||||||
[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;iex(New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/winutil.ps1')
|
[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;iex(New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/winutil.ps1')
|
||||||
```
|
```
|
||||||
|
If you are still having issues try changing your DNS provider to 1.1.1.1 or 8.8.8.8
|
||||||
|
|
||||||
EXE Wrapper for $10 @ https://www.cttstore.com/windows-toolbox
|
EXE Wrapper for $10 @ https://www.cttstore.com/windows-toolbox
|
||||||
|
|
||||||
|
@ -47,6 +47,10 @@
|
|||||||
"winget": "CPUID.CPU-Z",
|
"winget": "CPUID.CPU-Z",
|
||||||
"choco": "cpu-z"
|
"choco": "cpu-z"
|
||||||
},
|
},
|
||||||
|
"WPFInstalldeluge": {
|
||||||
|
"winget": "DelugeTeam.Deluge",
|
||||||
|
"choco": "deluge"
|
||||||
|
},
|
||||||
"WPFInstalldiscord": {
|
"WPFInstalldiscord": {
|
||||||
"winget": "Discord.Discord",
|
"winget": "Discord.Discord",
|
||||||
"choco": "discord"
|
"choco": "discord"
|
||||||
@ -204,7 +208,7 @@
|
|||||||
"choco": "putty"
|
"choco": "putty"
|
||||||
},
|
},
|
||||||
"WPFInstallpython3": {
|
"WPFInstallpython3": {
|
||||||
"winget": "Python.Python.3",
|
"winget": "Python.Python.3.11",
|
||||||
"choco": "python"
|
"choco": "python"
|
||||||
},
|
},
|
||||||
"WPFInstallrevo": {
|
"WPFInstallrevo": {
|
||||||
@ -399,6 +403,10 @@
|
|||||||
"Winget": "Rustlang.Rust.MSVC",
|
"Winget": "Rustlang.Rust.MSVC",
|
||||||
"choco": "rust"
|
"choco": "rust"
|
||||||
},
|
},
|
||||||
|
"WPFInstallgolang": {
|
||||||
|
"Winget": "GoLang.Go.1.19",
|
||||||
|
"choco": "golang"
|
||||||
|
},
|
||||||
"WPFInstallalacritty": {
|
"WPFInstallalacritty": {
|
||||||
"Winget": "Alacritty.Alacritty",
|
"Winget": "Alacritty.Alacritty",
|
||||||
"choco": "alacritty"
|
"choco": "alacritty"
|
||||||
|
30
config/dns.json
Normal file
30
config/dns.json
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"Google":{
|
||||||
|
"Primary": "8.8.8.8",
|
||||||
|
"Secondary": "8.8.4.4"
|
||||||
|
},
|
||||||
|
"Cloudflare":{
|
||||||
|
"Primary": "1.1.1.1",
|
||||||
|
"Secondary": "1.0.0.1"
|
||||||
|
},
|
||||||
|
"Cloudflare_Malware":{
|
||||||
|
"Primary": "1.1.1.2",
|
||||||
|
"Secondary": "1.0.0.2"
|
||||||
|
},
|
||||||
|
"Cloudflare_Malware_Adult":{
|
||||||
|
"Primary": "1.1.1.3",
|
||||||
|
"Secondary": "1.0.0.3"
|
||||||
|
},
|
||||||
|
"Level3":{
|
||||||
|
"Primary": "4.2.2.2",
|
||||||
|
"Secondary": "4.2.2.1"
|
||||||
|
},
|
||||||
|
"Open_DNS":{
|
||||||
|
"Primary": "208.67.222.222",
|
||||||
|
"Secondary": "208.67.220.220"
|
||||||
|
},
|
||||||
|
"Quad9":{
|
||||||
|
"Primary": "9.9.9.9",
|
||||||
|
"Secondary": "149.112.112.112"
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,9 @@
|
|||||||
#This file is meant to assist in building out the json files inside this folder.
|
#This file is meant to assist in building out the json files inside this folder.
|
||||||
|
|
||||||
|
#===========================================================================
|
||||||
|
# applications.json
|
||||||
|
#===========================================================================
|
||||||
|
|
||||||
<#
|
<#
|
||||||
Applications.json
|
Applications.json
|
||||||
-----------------
|
-----------------
|
||||||
@ -10,7 +14,6 @@
|
|||||||
The structure of the json is as follows
|
The structure of the json is as follows
|
||||||
|
|
||||||
{
|
{
|
||||||
"install": {
|
|
||||||
"Name of Button": {
|
"Name of Button": {
|
||||||
"winget": "Winget command"
|
"winget": "Winget command"
|
||||||
"choco": "Chocolatey command"
|
"choco": "Chocolatey command"
|
||||||
@ -20,7 +23,6 @@
|
|||||||
Example:
|
Example:
|
||||||
|
|
||||||
{
|
{
|
||||||
"install": {
|
|
||||||
"WPFInstalladobe": {
|
"WPFInstalladobe": {
|
||||||
"winget": "Adobe.Acrobat.Reader.64-bit"
|
"winget": "Adobe.Acrobat.Reader.64-bit"
|
||||||
"choco": "adobereader"
|
"choco": "adobereader"
|
||||||
@ -29,7 +31,6 @@ Example:
|
|||||||
"winget": "Famatech.AdvancedIPScanner"
|
"winget": "Famatech.AdvancedIPScanner"
|
||||||
"choco": "advanced-ip-scanner"
|
"choco": "advanced-ip-scanner"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#>
|
#>
|
||||||
@ -45,8 +46,8 @@ $ButtonToAdd = New-Object psobject
|
|||||||
$jsonfile = Get-Content ./config/applications.json | ConvertFrom-Json
|
$jsonfile = Get-Content ./config/applications.json | ConvertFrom-Json
|
||||||
|
|
||||||
#remove if already exists
|
#remove if already exists
|
||||||
if($jsonfile.install.$NameofButton){
|
if($jsonfile.$NameofButton){
|
||||||
$jsonfile.install.psobject.Properties.remove($NameofButton)
|
$jsonfile.psobject.Properties.remove($NameofButton)
|
||||||
}
|
}
|
||||||
|
|
||||||
Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "Winget" -Value $WingetCommand
|
Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "Winget" -Value $WingetCommand
|
||||||
@ -55,6 +56,10 @@ Add-Member -InputObject $jsonfile.install -MemberType NoteProperty -Name $Nameof
|
|||||||
|
|
||||||
$jsonfile | ConvertTo-Json | Out-File ./config/applications.json
|
$jsonfile | ConvertTo-Json | Out-File ./config/applications.json
|
||||||
|
|
||||||
|
#===========================================================================
|
||||||
|
# feature.json
|
||||||
|
#===========================================================================
|
||||||
|
|
||||||
<#
|
<#
|
||||||
feature.json
|
feature.json
|
||||||
-----------------
|
-----------------
|
||||||
@ -101,6 +106,10 @@ Add-Member -InputObject $jsonfile -MemberType NoteProperty -Name $NameofButton -
|
|||||||
|
|
||||||
$jsonfile | ConvertTo-Json | Out-File ./config/feature.json
|
$jsonfile | ConvertTo-Json | Out-File ./config/feature.json
|
||||||
|
|
||||||
|
#===========================================================================
|
||||||
|
# preset.json
|
||||||
|
#===========================================================================
|
||||||
|
|
||||||
<#
|
<#
|
||||||
preset.json
|
preset.json
|
||||||
-----------------
|
-----------------
|
||||||
@ -159,6 +168,10 @@ Add-Member -InputObject $jsonfile -MemberType NoteProperty -Name $NameofButton -
|
|||||||
|
|
||||||
$jsonfile | ConvertTo-Json | Out-File ./config/preset.json
|
$jsonfile | ConvertTo-Json | Out-File ./config/preset.json
|
||||||
|
|
||||||
|
#===========================================================================
|
||||||
|
# tweaks.json
|
||||||
|
#===========================================================================
|
||||||
|
|
||||||
<#
|
<#
|
||||||
tweaks.json
|
tweaks.json
|
||||||
-----------------
|
-----------------
|
||||||
@ -276,8 +289,6 @@ 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.
|
#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.
|
||||||
#Make sure to uncomment the sections you which to add.
|
#Make sure to uncomment the sections you which to add.
|
||||||
|
|
||||||
$NameofButton = ""
|
|
||||||
|
|
||||||
#$Registry = @(
|
#$Registry = @(
|
||||||
# #to add more repeat this seperated by a comma
|
# #to add more repeat this seperated by a comma
|
||||||
# @{
|
# @{
|
||||||
@ -319,6 +330,8 @@ $NameofButton = ""
|
|||||||
# ""
|
# ""
|
||||||
#)
|
#)
|
||||||
|
|
||||||
|
$NameofButton = "WPF" + ""
|
||||||
|
|
||||||
$ButtonToAdd = New-Object psobject
|
$ButtonToAdd = New-Object psobject
|
||||||
$jsonfile = Get-Content ./config/tweaks.json | ConvertFrom-Json
|
$jsonfile = Get-Content ./config/tweaks.json | ConvertFrom-Json
|
||||||
|
|
||||||
@ -337,3 +350,50 @@ if($UndoScript){Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -N
|
|||||||
Add-Member -InputObject $jsonfile -MemberType NoteProperty -Name $NameofButton -Value $ButtonToAdd
|
Add-Member -InputObject $jsonfile -MemberType NoteProperty -Name $NameofButton -Value $ButtonToAdd
|
||||||
|
|
||||||
($jsonfile | ConvertTo-Json -Depth 5).replace('\r\n',"`r`n") | Out-File ./config/tweaks.json
|
($jsonfile | ConvertTo-Json -Depth 5).replace('\r\n',"`r`n") | Out-File ./config/tweaks.json
|
||||||
|
|
||||||
|
#===========================================================================
|
||||||
|
# dns.json
|
||||||
|
#===========================================================================
|
||||||
|
|
||||||
|
<#
|
||||||
|
dns.json
|
||||||
|
-----------------
|
||||||
|
This file holds all the DNS entrees.
|
||||||
|
|
||||||
|
The structure of the json is as follows
|
||||||
|
|
||||||
|
{
|
||||||
|
"DNS Provider": [
|
||||||
|
"Primary": "IP address",
|
||||||
|
"Secondary": "IP address"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
Example:
|
||||||
|
{
|
||||||
|
"Cloudflare":{
|
||||||
|
"Primary": "1.1.1.1",
|
||||||
|
"Secondary": "1.0.0.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#>
|
||||||
|
|
||||||
|
#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.
|
||||||
|
|
||||||
|
$NameofProvider = "" -replace " ","_"
|
||||||
|
$IPAddress = @{
|
||||||
|
"Primary" = "0.0.0.0"
|
||||||
|
"Secondary" = "0.0.0.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
$ButtonToAdd = New-Object psobject
|
||||||
|
$jsonfile = Get-Content ./config/dns.json | ConvertFrom-Json
|
||||||
|
|
||||||
|
#remove if already exists
|
||||||
|
if($jsonfile.$NameofProvider){
|
||||||
|
$jsonfile.psobject.Properties.remove($NameofProvider)
|
||||||
|
}
|
||||||
|
|
||||||
|
Add-Member -InputObject $jsonfile -MemberType NoteProperty -Name $NameofProvider -Value $IPAddress
|
||||||
|
|
||||||
|
($jsonfile | ConvertTo-Json -Depth 5).replace('\r\n',"`r`n") | Out-File ./config/dns.json
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"EssTweaksAH": {
|
"WPFEssTweaksAH": {
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
|
||||||
@ -24,57 +24,25 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"EssTweaksDVR": {
|
"WPFEssTweaksHiber": {
|
||||||
"registry": [
|
|
||||||
{
|
|
||||||
"Path": "HKLM:\\System\\GameConfigStore",
|
|
||||||
"Name": "GameDVR_DXGIHonorFSEWindowsCompatible",
|
|
||||||
"Type": "Hex",
|
|
||||||
"Value": "00000000",
|
|
||||||
"OriginalValue": "1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Path": "HKLM:\\System\\GameConfigStore",
|
|
||||||
"Name": "GameDVR_HonorUserFSEBehaviorMode",
|
|
||||||
"Type": "Hex",
|
|
||||||
"Value": "00000000",
|
|
||||||
"OriginalValue": "1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Path": "HKLM:\\System\\GameConfigStore",
|
|
||||||
"Name": "GameDVR_EFSEFeatureFlags",
|
|
||||||
"Type": "Hex",
|
|
||||||
"Value": "00000000",
|
|
||||||
"OriginalValue": "1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Path": "HKLM:\\System\\GameConfigStore",
|
|
||||||
"Name": "GameDVR_Enabled",
|
|
||||||
"Type": "Hex",
|
|
||||||
"Value": "00000000",
|
|
||||||
"OriginalValue": "1"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"EssTweaksHiber": {
|
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\System\\CurrentControlSet\\Control\\Session Manager\\Power",
|
"Path": "HKLM:\\System\\CurrentControlSet\\Control\\Session Manager\\Power",
|
||||||
"Name": "GameDVR_DXGIHonorFSEWindowsCompatible",
|
"Name": "HibernateEnabled",
|
||||||
"Type": "Dword",
|
"Type": "Dword",
|
||||||
"Value": "0",
|
"Value": "0",
|
||||||
"OriginalValue": "1"
|
"OriginalValue": "1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FlyoutMenuSettings",
|
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FlyoutMenuSettings",
|
||||||
"Name": "GameDVR_HonorUserFSEBehaviorMode",
|
"Name": "ShowHibernateOption",
|
||||||
"Type": "Dword",
|
"Type": "Dword",
|
||||||
"Value": "0",
|
"Value": "0",
|
||||||
"OriginalValue": "1"
|
"OriginalValue": "1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"EssTweaksHome": {
|
"WPFEssTweaksHome": {
|
||||||
"service": [
|
"service": [
|
||||||
{
|
{
|
||||||
"Name": "HomeGroupListener",
|
"Name": "HomeGroupListener",
|
||||||
@ -88,7 +56,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"EssTweaksLoc": {
|
"WPFEssTweaksLoc": {
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location",
|
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location",
|
||||||
@ -120,7 +88,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"EssTweaksServices": {
|
"WPFEssTweaksServices": {
|
||||||
"service": [
|
"service": [
|
||||||
{
|
{
|
||||||
"StartupType": "Manual",
|
"StartupType": "Manual",
|
||||||
@ -464,7 +432,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"EssTweaksTele": {
|
"WPFEssTweaksTele": {
|
||||||
"ScheduledTask": [
|
"ScheduledTask": [
|
||||||
{
|
{
|
||||||
"Name": "Microsoft\\Windows\\Application Experience\\Microsoft Compatibility Appraiser",
|
"Name": "Microsoft\\Windows\\Application Experience\\Microsoft Compatibility Appraiser",
|
||||||
@ -681,74 +649,53 @@
|
|||||||
"value": 1,
|
"value": 1,
|
||||||
"type": "Dword"
|
"type": "Dword"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\FileSystem",
|
||||||
|
"OriginalValue": "0",
|
||||||
|
"name": "LongPathsEnabled",
|
||||||
|
"value": 1,
|
||||||
|
"type": "Dword"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching",
|
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching",
|
||||||
"OriginalValue": "1",
|
"OriginalValue": "1",
|
||||||
"name": "SearchOrderConfig",
|
"name": "SearchOrderConfig",
|
||||||
"value": "00000000",
|
"value": "0",
|
||||||
"type": "Dword"
|
"type": "Dword"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile",
|
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile",
|
||||||
"OriginalValue": "1",
|
"OriginalValue": "1",
|
||||||
"name": "SystemResponsiveness",
|
"name": "SystemResponsiveness",
|
||||||
"value": "0000000a",
|
"value": "0",
|
||||||
"type": "Dword"
|
"type": "Dword"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile",
|
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile",
|
||||||
"OriginalValue": "1",
|
"OriginalValue": "1",
|
||||||
"name": "NetworkThrottlingIndex",
|
"name": "NetworkThrottlingIndex",
|
||||||
"value": "0000000a",
|
"value": "4294967295",
|
||||||
"type": "Dword"
|
"type": "Dword"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control",
|
"Path": "HKCU:\\Control Panel\\Desktop",
|
||||||
"OriginalValue": "1",
|
|
||||||
"name": "WaitToKillServiceTimeout",
|
|
||||||
"value": "2000",
|
|
||||||
"type": "Dword"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Path": "HKLM:\\Control Panel\\Desktop",
|
|
||||||
"OriginalValue": "1",
|
"OriginalValue": "1",
|
||||||
"name": "MenuShowDelay",
|
"name": "MenuShowDelay",
|
||||||
"value": "0",
|
"value": "1",
|
||||||
"type": "Dword"
|
"type": "Dword"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\Control Panel\\Desktop",
|
"Path": "HKCU:\\Control Panel\\Desktop",
|
||||||
"OriginalValue": "1",
|
|
||||||
"name": "WaitToKillAppTimeout",
|
|
||||||
"value": "5000",
|
|
||||||
"type": "Dword"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Path": "HKLM:\\Control Panel\\Desktop",
|
|
||||||
"OriginalValue": "1",
|
"OriginalValue": "1",
|
||||||
"name": "AutoEndTasks",
|
"name": "AutoEndTasks",
|
||||||
"value": "1",
|
"value": "1",
|
||||||
"type": "Dword"
|
"type": "Dword"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Path": "HKLM:\\Control Panel\\Desktop",
|
|
||||||
"OriginalValue": "1",
|
|
||||||
"name": "LowLevelHooksTimeout",
|
|
||||||
"value": "00001000",
|
|
||||||
"type": "Dword"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Path": "HKLM:\\Control Panel\\Desktop",
|
|
||||||
"OriginalValue": "1",
|
|
||||||
"name": "WaitToKillServiceTimeout",
|
|
||||||
"value": "00002000",
|
|
||||||
"type": "Dword"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management",
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management",
|
||||||
"OriginalValue": "0",
|
"OriginalValue": "0",
|
||||||
"name": "ClearPageFileAtShutdown",
|
"name": "ClearPageFileAtShutdown",
|
||||||
"value": "00000000",
|
"value": "0",
|
||||||
"type": "Dword"
|
"type": "Dword"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -759,11 +706,11 @@
|
|||||||
"type": "Dword"
|
"type": "Dword"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\Control Panel\\Mouse",
|
"Path": "HKCU:\\Control Panel\\Mouse",
|
||||||
"OriginalValue": "1",
|
"OriginalValue": "1",
|
||||||
"name": "MouseHoverTime",
|
"name": "MouseHoverTime",
|
||||||
"value": "00000010",
|
"value": "400",
|
||||||
"type": "Dword"
|
"type": "String"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Parameters",
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Parameters",
|
||||||
@ -792,6 +739,27 @@
|
|||||||
"name": "HideSCAMeetNow",
|
"name": "HideSCAMeetNow",
|
||||||
"value": "1",
|
"value": "1",
|
||||||
"type": "Dword"
|
"type": "Dword"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile\\Tasks\\Games",
|
||||||
|
"OriginalValue": "1",
|
||||||
|
"name": "GPU Priority",
|
||||||
|
"value": "8",
|
||||||
|
"type": "Dword"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile\\Tasks\\Games",
|
||||||
|
"OriginalValue": "1",
|
||||||
|
"name": "Priority",
|
||||||
|
"value": "6",
|
||||||
|
"type": "Dword"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile\\Tasks\\Games",
|
||||||
|
"OriginalValue": "High",
|
||||||
|
"name": "Scheduling Category",
|
||||||
|
"value": "High",
|
||||||
|
"type": "String"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"service": [
|
"service": [
|
||||||
@ -833,10 +801,21 @@
|
|||||||
If (Test-Path \"$autoLoggerDir\\AutoLogger-Diagtrack-Listener.etl\") {
|
If (Test-Path \"$autoLoggerDir\\AutoLogger-Diagtrack-Listener.etl\") {
|
||||||
Remove-Item \"$autoLoggerDir\\AutoLogger-Diagtrack-Listener.etl\"
|
Remove-Item \"$autoLoggerDir\\AutoLogger-Diagtrack-Listener.etl\"
|
||||||
}
|
}
|
||||||
icacls $autoLoggerDir /deny SYSTEM:`(OI`)`(CI`)F | Out-Null"
|
icacls $autoLoggerDir /deny SYSTEM:`(OI`)`(CI`)F | Out-Null
|
||||||
|
|
||||||
|
#Timeout Tweaks cause flickering on Windows now
|
||||||
|
#Remove-ItemProperty -Path \"HKCU:\\Control Panel\\Desktop\" -Name \"WaitToKillAppTimeout\" -ErrorAction SilentlyContinue
|
||||||
|
#Remove-ItemProperty -Path \"HKCU:\\Control Panel\\Desktop\" -Name \"HungAppTimeout\" -ErrorAction SilentlyContinue
|
||||||
|
#Remove-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\" -Name \"WaitToKillServiceTimeout\" -ErrorAction SilentlyContinue
|
||||||
|
#Remove-ItemProperty -Path \"HKCU:\\Control Panel\\Desktop\" -Name \"LowLevelHooksTimeout\" -ErrorAction SilentlyContinue
|
||||||
|
#Remove-ItemProperty -Path \"HKCU:\\Control Panel\\Desktop\" -Name \"WaitToKillServiceTimeout\" -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
$ram = (Get-CimInstance -ClassName \"Win32_PhysicalMemory\" | Measure-Object -Property Capacity -Sum).Sum / 1kb
|
||||||
|
Set-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\" -Name \"SvcHostSplitThresholdInKB\" -Type DWord -Value $ram -Force
|
||||||
|
"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"EssTweaksWifi": {
|
"WPFEssTweaksWifi": {
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\Software\\Microsoft\\PolicyManager\\default\\WiFi\\AllowWiFiHotSpotReporting",
|
"Path": "HKLM:\\Software\\Microsoft\\PolicyManager\\default\\WiFi\\AllowWiFiHotSpotReporting",
|
||||||
@ -854,7 +833,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"MiscTweaksLapPower": {
|
"WPFMiscTweaksLapPower": {
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power\\PowerThrottling",
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power\\PowerThrottling",
|
||||||
@ -872,7 +851,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"MiscTweaksPower": {
|
"WPFMiscTweaksPower": {
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power\\PowerThrottling",
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power\\PowerThrottling",
|
||||||
@ -890,7 +869,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"MiscTweaksExt": {
|
"WPFMiscTweaksExt": {
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
||||||
@ -901,7 +880,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"MiscTweaksUTC": {
|
"WPFMiscTweaksUTC": {
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation",
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation",
|
||||||
@ -912,7 +891,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"MiscTweaksDisplay": {
|
"WPFMiscTweaksDisplay": {
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"path": "HKCU:\\Control Panel\\Desktop",
|
"path": "HKCU:\\Control Panel\\Desktop",
|
||||||
@ -982,7 +961,7 @@
|
|||||||
"Set-ItemProperty -Path \"HKCU:\\Control Panel\\Desktop\" -Name \"UserPreferencesMask\" -Type Binary -Value ([byte[]](144,18,3,128,16,0,0,0))"
|
"Set-ItemProperty -Path \"HKCU:\\Control Panel\\Desktop\" -Name \"UserPreferencesMask\" -Type Binary -Value ([byte[]](144,18,3,128,16,0,0,0))"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"EssTweaksDeBloat": {
|
"WPFEssTweaksDeBloat": {
|
||||||
"appx": [
|
"appx": [
|
||||||
"Microsoft.Microsoft3DViewer",
|
"Microsoft.Microsoft3DViewer",
|
||||||
"Microsoft.AppConnector",
|
"Microsoft.AppConnector",
|
||||||
@ -1058,84 +1037,141 @@
|
|||||||
"*AdobePhotoshopExpress*",
|
"*AdobePhotoshopExpress*",
|
||||||
"*HotspotShieldFreeVPN*",
|
"*HotspotShieldFreeVPN*",
|
||||||
"*Microsoft.Advertising.Xaml*"
|
"*Microsoft.Advertising.Xaml*"
|
||||||
|
],
|
||||||
|
"InvokeScript": [
|
||||||
|
"
|
||||||
|
$TeamsPath = [System.IO.Path]::Combine($env:LOCALAPPDATA, 'Microsoft', 'Teams')
|
||||||
|
$TeamsUpdateExePath = [System.IO.Path]::Combine($TeamsPath, 'Update.exe')
|
||||||
|
|
||||||
|
Write-Host \"Stopping Teams process...\"
|
||||||
|
Stop-Process -Name \"*teams*\" -Force -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
Write-Host \"Uninstalling Teams from AppData\\Microsoft\\Teams\"
|
||||||
|
if ([System.IO.File]::Exists($TeamsUpdateExePath)) {
|
||||||
|
# Uninstall app
|
||||||
|
$proc = Start-Process $TeamsUpdateExePath \"-uninstall -s\" -PassThru
|
||||||
|
$proc.WaitForExit()
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host \"Removing Teams AppxPackage...\"
|
||||||
|
Get-AppxPackage \"*Teams*\" | Remove-AppxPackage -ErrorAction SilentlyContinue
|
||||||
|
Get-AppxPackage \"*Teams*\" -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
Write-Host \"Deleting Teams directory\"
|
||||||
|
if ([System.IO.Directory]::Exists($TeamsPath)) {
|
||||||
|
Remove-Item $TeamsPath -Force -Recurse -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host \"Deleting Teams uninstall registry key\"
|
||||||
|
# Uninstall from Uninstall registry key UninstallString
|
||||||
|
$us = (Get-ChildItem -Path HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall, HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall | Get-ItemProperty | Where-Object { $_.DisplayName -like '*Teams*'}).UninstallString
|
||||||
|
if ($us.Length -gt 0) {
|
||||||
|
$us = ($us.Replace('/I', '/uninstall ') + ' /quiet').Replace(' ', ' ')
|
||||||
|
$FilePath = ($us.Substring(0, $us.IndexOf('.exe') + 4).Trim())
|
||||||
|
$ProcessArgs = ($us.Substring($us.IndexOf('.exe') + 5).Trim().replace(' ', ' '))
|
||||||
|
$proc = Start-Process -FilePath $FilePath -Args $ProcessArgs -PassThru
|
||||||
|
$proc.WaitForExit()
|
||||||
|
}
|
||||||
|
"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"EssTweaksOO": {
|
"WPFEssTweaksOO": {
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"Import-Module BitsTransfer
|
"curl.exe -s \"https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/ooshutup10.cfg\" -o $ENV:temp\\ooshutup10.cfg
|
||||||
Start-BitsTransfer -Source \"https://raw.githubusercontent.com/ChrisTitusTech/win10script/master/ooshutup10.cfg\" -Destination C:\\Windows\\Temp\\ooshutup10.cfg
|
curl.exe -s \"https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe\" -o $ENV:temp\\OOSU10.exe
|
||||||
Start-BitsTransfer -Source \"https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe\" -Destination C:\\Windows\\Temp\\OOSU10.exe
|
Start-Process $ENV:temp\\OOSU10.exe -ArgumentList \"$ENV:temp\\ooshutup10.cfg /quiet\"
|
||||||
C:\\Windows\\Temp\\OOSU10.exe C:\\Windows\\Temp\\ooshutup10.cfg /quiet"
|
"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"EssTweaksRP": {
|
"WPFEssTweaksRP": {
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"Enable-ComputerRestore -Drive \"C:\\\"
|
"Enable-ComputerRestore -Drive \"$env:SystemDrive\"
|
||||||
Checkpoint-Computer -Description \"RestorePoint1\" -RestorePointType \"MODIFY_SETTINGS\""
|
Checkpoint-Computer -Description \"RestorePoint1\" -RestorePointType \"MODIFY_SETTINGS\""
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"EssTweaksStorage": {
|
"WPFEssTweaksStorage": {
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"Remove-Item -Path \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy\" -Recurse -ErrorAction SilentlyContinue"
|
"Remove-Item -Path \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy\" -Recurse -ErrorAction SilentlyContinue"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"MiscTweaksLapNum": {
|
"WPFMiscTweaksLapNum": {
|
||||||
"InvokeScript": [
|
"Registry": [
|
||||||
"If (!(Test-Path \"HKU:\")) {
|
{
|
||||||
New-PSDrive -Name HKU -PSProvider Registry -Root HKEY_USERS | Out-Null
|
"path": "HKU:\\.DEFAULT\\Control Panel\\Keyboard",
|
||||||
|
"OriginalValue": "1",
|
||||||
|
"name": "InitialKeyboardIndicators",
|
||||||
|
"value": "0",
|
||||||
|
"type": "DWord"
|
||||||
}
|
}
|
||||||
Set-ItemProperty -Path \"HKU:\\.DEFAULT\\Control Panel\\Keyboard\" -Name \"InitialKeyboardIndicators\" -Type DWord -Value 0"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"MiscTweaksNum": {
|
"WPFMiscTweaksNum": {
|
||||||
"InvokeScript": [
|
"Registry": [
|
||||||
"If (!(Test-Path \"HKU:\")) {
|
{
|
||||||
New-PSDrive -Name HKU -PSProvider Registry -Root HKEY_USERS | Out-Null
|
"path": "HKU:\\.DEFAULT\\Control Panel\\Keyboard",
|
||||||
|
"OriginalValue": "1",
|
||||||
|
"name": "InitialKeyboardIndicators",
|
||||||
|
"value": "80000002",
|
||||||
|
"type": "DWord"
|
||||||
}
|
}
|
||||||
Set-ItemProperty -Path \"HKU:\\.DEFAULT\\Control Panel\\Keyboard\" -Name \"InitialKeyboardIndicators\" -Type DWord -Value 2"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"EssTweaksRemoveEdge": {
|
"WPFEssTweaksRemoveEdge": {
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"Invoke-WebRequest -useb https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/Edge_Removal.bat | Invoke-Expression"
|
"Invoke-WebRequest -useb https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/Edge_Removal.bat | Invoke-Expression"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"MiscTweaksDisableNotifications": {
|
"WPFMiscTweaksDisableNotifications": {
|
||||||
"InvokeScript": [
|
"registry": [
|
||||||
"New-Item -Path \"HKCU:\\Software\\Policies\\Microsoft\\Windows\" -Name \"Explorer\" -force
|
{
|
||||||
New-ItemProperty -Path \"HKCU:\\Software\\Policies\\Microsoft\\Windows\\Explorer\" -Name \"DisableNotificationCenter\" -PropertyType \"DWord\" -Value 1
|
"Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\Explorer",
|
||||||
New-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\PushNotifications\" -Name \"ToastEnabled\" -PropertyType \"DWord\" -Value 0 -force"
|
"Name": "DisableNotificationCenter",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "1",
|
||||||
|
"OriginalValue": "0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\PushNotifications",
|
||||||
|
"Name": "ToastEnabled",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"MiscTweaksRightClickMenu": {
|
"WPFMiscTweaksRightClickMenu": {
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\" "
|
"New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\" "
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"EssTweaksDiskCleanup": {
|
"WPFEssTweaksDiskCleanup": {
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"cleanmgr.exe /d C: /VERYLOWDISK"
|
"cleanmgr.exe /d C: /VERYLOWDISK"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"MiscTweaksDisableTPMCheck": {
|
"WPFMiscTweaksDisableTPMCheck": {
|
||||||
"InvokeScript": [
|
"registry": [
|
||||||
"If (!(Test-Path \"HKLM:\\SYSTEM\\Setup\\MoSetup\")) {
|
{
|
||||||
New-Item -Path \"HKLM:\\SYSTEM\\Setup\\MoSetup\" -Force | Out-Null
|
"Path": "HKLM:\\SYSTEM\\Setup\\MoSetup",
|
||||||
|
"Name": "AllowUpgradesWithUnsupportedTPM",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "1",
|
||||||
|
"OriginalValue": "0"
|
||||||
}
|
}
|
||||||
Set-ItemProperty -Path \"HKLM:\\SYSTEM\\Setup\\MoSetup\" -Name \"AllowUpgradesWithUnsupportedTPM\" -Type DWord -Value 1"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"MiscTweaksDisableUAC": {
|
"WPFMiscTweaksDisableUAC": {
|
||||||
"InvokeScript": [
|
"registry": [
|
||||||
"# This below is the pussy mode which can break some apps. Please. Leave this on 1.
|
{
|
||||||
# below i will show a way to do it without breaking some Apps that check UAC. U need to be admin tho.
|
"path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",
|
||||||
# Set-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\" -Name \"EnableLUA\" -Type DWord -Value 0
|
"OriginalValue": "5",
|
||||||
Set-ItemProperty -Path HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System -Name ConsentPromptBehaviorAdmin -Type DWord -Value 0 # Default is 5
|
"name": "ConsentPromptBehaviorAdmin",
|
||||||
# This will set the GPO Entry in Security so that Admin users elevate without any prompt while normal users still elevate and u can even leave it ennabled.
|
"value": "0",
|
||||||
# It will just not bother u anymore"
|
"type": "DWord"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"MiscTweaksDisableMouseAcceleration": {
|
"WPFMiscTweaksDisableMouseAcceleration": {
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"path": "HKCU:\\Control Panel\\Mouse",
|
"path": "HKCU:\\Control Panel\\Mouse",
|
||||||
@ -1160,7 +1196,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"MiscTweaksEnableMouseAcceleration": {
|
"WPFMiscTweaksEnableMouseAcceleration": {
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"path": "HKCU:\\Control Panel\\Mouse",
|
"path": "HKCU:\\Control Panel\\Mouse",
|
||||||
@ -1185,15 +1221,72 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"EssTweaksDeleteTempFiles": {
|
"WPFEssTweaksDeleteTempFiles": {
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"Get-ChildItem -Path \"C:\\Windows\\Temp\" *.* -Recurse | Remove-Item -Force -Recurse
|
"Get-ChildItem -Path \"C:\\Windows\\Temp\" *.* -Recurse | Remove-Item -Force -Recurse
|
||||||
Get-ChildItem -Path $env:TEMP *.* -Recurse | Remove-Item -Force -Recurse"
|
Get-ChildItem -Path $env:TEMP *.* -Recurse | Remove-Item -Force -Recurse"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"EssTweaksRemoveCortana": {
|
"WPFEssTweaksRemoveCortana": {
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"Get-AppxPackage -allusers Microsoft.549981C3F5F10 | Remove-AppxPackage"
|
"Get-AppxPackage -allusers Microsoft.549981C3F5F10 | Remove-AppxPackage"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"WPFEssTweaksDVR": {
|
||||||
|
"registry": [
|
||||||
|
{
|
||||||
|
"Path": "HKCU:\\System\\GameConfigStore",
|
||||||
|
"Name": "GameDVR_FSEBehavior",
|
||||||
|
"Value": "2",
|
||||||
|
"OriginalValue": "1",
|
||||||
|
"Type": "DWord"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKCU:\\System\\GameConfigStore",
|
||||||
|
"Name": "GameDVR_Enabled",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1",
|
||||||
|
"Type": "DWord"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKCU:\\System\\GameConfigStore",
|
||||||
|
"Name": "GameDVR_DXGIHonorFSEWindowsCompatible",
|
||||||
|
"Value": "1",
|
||||||
|
"OriginalValue": "0",
|
||||||
|
"Type": "DWord"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKCU:\\System\\GameConfigStore",
|
||||||
|
"Name": "GameDVR_HonorUserFSEBehaviorMode",
|
||||||
|
"Value": "1",
|
||||||
|
"OriginalValue": "0",
|
||||||
|
"Type": "DWord"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKCU:\\System\\GameConfigStore",
|
||||||
|
"Name": "GameDVR_EFSEFeatureFlags",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1",
|
||||||
|
"Type": "DWord"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\GameDVR",
|
||||||
|
"Name": "AllowGameDVR",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1",
|
||||||
|
"Type": "DWord"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"WPFBingSearch": {
|
||||||
|
"registry": [
|
||||||
|
{
|
||||||
|
"OriginalValue": "1",
|
||||||
|
"Name": "BingSearchEnabled",
|
||||||
|
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Search",
|
||||||
|
"Type": "DWORD",
|
||||||
|
"Value": "0"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
52
functions/private/Get-WinUtilCheckBoxes.ps1
Normal file
52
functions/private/Get-WinUtilCheckBoxes.ps1
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
Function Get-WinUtilCheckBoxes {
|
||||||
|
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Function is meant to find all checkboxes that are checked on the specefic tab and input them into a script.
|
||||||
|
|
||||||
|
Outputed data will be the names of the checkboxes that were checked
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
Get-WinUtilCheckBoxes "WPFInstall"
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
Param(
|
||||||
|
$Group,
|
||||||
|
[boolean]$unCheck = $true
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
$Output = New-Object System.Collections.Generic.List[System.Object]
|
||||||
|
|
||||||
|
if($Group -eq "WPFInstall"){
|
||||||
|
$CheckBoxes = get-variable | Where-Object {$psitem.name -like "WPFInstall*" -and $psitem.value.GetType().name -eq "CheckBox"}
|
||||||
|
Foreach ($CheckBox in $CheckBoxes){
|
||||||
|
if($CheckBox.value.ischecked -eq $true){
|
||||||
|
$sync.configs.applications.$($CheckBox.name).winget -split ";" | ForEach-Object {
|
||||||
|
$Output.Add($psitem)
|
||||||
|
}
|
||||||
|
if ($uncheck -eq $true){
|
||||||
|
$CheckBox.value.ischecked = $false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($Group -eq "WPFTweaks"){
|
||||||
|
$CheckBoxes = get-variable | Where-Object {$psitem.name -like "WPF*Tweaks*" -and $psitem.value.GetType().name -eq "CheckBox"}
|
||||||
|
Foreach ($CheckBox in $CheckBoxes){
|
||||||
|
if($CheckBox.value.ischecked -eq $true){
|
||||||
|
$Output.Add($Checkbox.Name)
|
||||||
|
|
||||||
|
if ($uncheck -eq $true){
|
||||||
|
$CheckBox.value.ischecked = $false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Output $($Output | Select-Object -Unique)
|
||||||
|
}
|
16
functions/private/Get-WinUtilDarkMode.ps1
Normal file
16
functions/private/Get-WinUtilDarkMode.ps1
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Function Get-WinUtilDarkMode {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Meant to pull the registry keys responsible for Dark Mode and returns true or false
|
||||||
|
|
||||||
|
#>
|
||||||
|
$app = (Get-ItemProperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize').AppsUseLightTheme
|
||||||
|
$system = (Get-ItemProperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize').SystemUsesLightTheme
|
||||||
|
if($app -eq 0 -and $system -eq 0){
|
||||||
|
return $true
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
}
|
18
functions/private/Get-WinUtilInstallerProcess.ps1
Normal file
18
functions/private/Get-WinUtilInstallerProcess.ps1
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
function Get-WinUtilInstallerProcess {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Meant to check for running processes and will return a boolean response
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
param($Process)
|
||||||
|
|
||||||
|
if ($Null -eq $Process){
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
if (Get-Process -Id $Process.Id -ErrorAction SilentlyContinue){
|
||||||
|
return $true
|
||||||
|
}
|
||||||
|
return $false
|
||||||
|
}
|
30
functions/private/Install-WinUtilChoco.ps1
Normal file
30
functions/private/Install-WinUtilChoco.ps1
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
function Install-WinUtilChoco {
|
||||||
|
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Function is meant to ensure Choco is installed
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
try{
|
||||||
|
Write-Host "Checking if Chocolatey is Installed..."
|
||||||
|
|
||||||
|
if((Test-WinUtilPackageManager -choco)){
|
||||||
|
Write-Host "Chocolatey Already Installed"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Seems Chocolatey is not installed, installing now?"
|
||||||
|
#Let user decide if he wants to install Chocolatey
|
||||||
|
$confirmation = Read-Host "Are you Sure You Want To Proceed:(y/n)"
|
||||||
|
if ($confirmation -eq 'y') {
|
||||||
|
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) -ErrorAction Stop
|
||||||
|
powershell choco feature enable -n allowGlobalConfirmation
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Catch{
|
||||||
|
throw [ChocoFailedInstall]::new('Failed to install')
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
28
functions/private/Install-WinUtilProgramWinget.ps1
Normal file
28
functions/private/Install-WinUtilProgramWinget.ps1
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
Function Install-WinUtilProgramWinget {
|
||||||
|
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
This will install programs via Winget using a new powershell.exe instance to prevent the GUI from locking up.
|
||||||
|
|
||||||
|
Note the triple quotes are required any time you need a " in a normal script block.
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
param($ProgramsToInstall)
|
||||||
|
|
||||||
|
$x = 0
|
||||||
|
$count = $($ProgramsToInstall -split ",").Count
|
||||||
|
|
||||||
|
Write-Progress -Activity "Installing Applications" -Status "Starting" -PercentComplete 0
|
||||||
|
|
||||||
|
Foreach ($Program in $($ProgramsToInstall -split ",")){
|
||||||
|
|
||||||
|
Write-Progress -Activity "Installing Applications" -Status "Installing $Program $($x + 1) of $count" -PercentComplete $($x/$count*100)
|
||||||
|
Start-Process -FilePath winget -ArgumentList "install -e --accept-source-agreements --accept-package-agreements --silent $Program" -NoNewWindow -Wait;
|
||||||
|
$X++
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Progress -Activity "Installing Applications" -Status "Finished" -Completed
|
||||||
|
|
||||||
|
}
|
68
functions/private/Install-WinUtilWinget.ps1
Normal file
68
functions/private/Install-WinUtilWinget.ps1
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
function Install-WinUtilWinget {
|
||||||
|
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Function is meant to ensure winget is installed
|
||||||
|
|
||||||
|
#>
|
||||||
|
Try{
|
||||||
|
Write-Host "Checking if Winget is Installed..."
|
||||||
|
if (Test-WinUtilPackageManager -winget) {
|
||||||
|
#Checks if winget executable exists and if the Windows Version is 1809 or higher
|
||||||
|
Write-Host "Winget Already Installed"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
#Gets the computer's information
|
||||||
|
if ($null -eq $sync.ComputerInfo){
|
||||||
|
$ComputerInfo = Get-ComputerInfo -ErrorAction Stop
|
||||||
|
}
|
||||||
|
Else {
|
||||||
|
$ComputerInfo = $sync.ComputerInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($ComputerInfo.WindowsVersion) -lt "1809") {
|
||||||
|
#Checks if Windows Version is too old for winget
|
||||||
|
Write-Host "Winget is not supported on this version of Windows (Pre-1809)"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
#Gets the Windows Edition
|
||||||
|
$OSName = if ($ComputerInfo.OSName) {
|
||||||
|
$ComputerInfo.OSName
|
||||||
|
}else {
|
||||||
|
$ComputerInfo.WindowsProductName
|
||||||
|
}
|
||||||
|
|
||||||
|
if (((($OSName.IndexOf("LTSC")) -ne -1) -or ($OSName.IndexOf("Server") -ne -1)) -and (($ComputerInfo.WindowsVersion) -ge "1809")) {
|
||||||
|
|
||||||
|
Write-Host "Running Alternative Installer for LTSC/Server Editions"
|
||||||
|
|
||||||
|
# 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/ChrisTitusTech/winutil/$BranchToUse/winget.ps1 | iex | Out-Host" -WindowStyle Normal -ErrorAction Stop
|
||||||
|
|
||||||
|
if(!(Test-WinUtilPackageManager -winget)){
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
#Installing Winget from the Microsoft Store
|
||||||
|
Write-Host "Winget not found, installing it now."
|
||||||
|
Start-Process "ms-appinstaller:?source=https://aka.ms/getwinget"
|
||||||
|
$nid = (Get-Process AppInstaller).Id
|
||||||
|
Wait-Process -Id $nid
|
||||||
|
|
||||||
|
if(!(Test-WinUtilPackageManager -winget)){
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Write-Host "Winget Installed"
|
||||||
|
}
|
||||||
|
Catch{
|
||||||
|
throw [WingetFailedInstall]::new('Failed to install')
|
||||||
|
}
|
||||||
|
}
|
26
functions/private/Invoke-WinUtilScript.ps1
Normal file
26
functions/private/Invoke-WinUtilScript.ps1
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
function Invoke-WinUtilScript {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
This function will run a seperate powershell script. Meant for things that can't be handled with the other functions
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
$Scriptblock = [scriptblock]::Create({"Write-output 'Hello World'"})
|
||||||
|
Invoke-WinUtilScript -ScriptBlock $scriptblock -Name "Hello World"
|
||||||
|
|
||||||
|
#>
|
||||||
|
param (
|
||||||
|
$Name,
|
||||||
|
[scriptblock]$scriptblock
|
||||||
|
)
|
||||||
|
|
||||||
|
Try{
|
||||||
|
Invoke-Command $scriptblock -ErrorAction stop
|
||||||
|
Write-Host "Running Script for $name"
|
||||||
|
}
|
||||||
|
Catch{
|
||||||
|
Write-Warning "Unable to run script for $name due to unhandled exception"
|
||||||
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
|
}
|
||||||
|
}
|
57
functions/private/Invoke-WinUtilTweaks.ps1
Normal file
57
functions/private/Invoke-WinUtilTweaks.ps1
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
function Invoke-WinUtilTweaks {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
This function converts all the values from the tweaks.json and routes them to the appropriate function
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
param(
|
||||||
|
$CheckBox,
|
||||||
|
$undo = $false
|
||||||
|
)
|
||||||
|
if($undo){
|
||||||
|
$Values = @{
|
||||||
|
Registry = "OriginalValue"
|
||||||
|
ScheduledTask = "OriginalState"
|
||||||
|
Service = "OriginalType"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Else{
|
||||||
|
$Values = @{
|
||||||
|
Registry = "Value"
|
||||||
|
ScheduledTask = "State"
|
||||||
|
Service = "StartupType"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($sync.configs.tweaks.$CheckBox.registry){
|
||||||
|
$sync.configs.tweaks.$CheckBox.registry | ForEach-Object {
|
||||||
|
Set-WinUtilRegistry -Name $psitem.Name -Path $psitem.Path -Type $psitem.Type -Value $psitem.$($values.registry)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($sync.configs.tweaks.$CheckBox.ScheduledTask){
|
||||||
|
$sync.configs.tweaks.$CheckBox.ScheduledTask | ForEach-Object {
|
||||||
|
Set-WinUtilScheduledTask -Name $psitem.Name -State $psitem.$($values.ScheduledTask)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($sync.configs.tweaks.$CheckBox.service){
|
||||||
|
$sync.configs.tweaks.$CheckBox.service | ForEach-Object {
|
||||||
|
Set-WinUtilService -Name $psitem.Name -StartupType $psitem.$($values.Service)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$undo){
|
||||||
|
if($sync.configs.tweaks.$CheckBox.appx){
|
||||||
|
$sync.configs.tweaks.$CheckBox.appx | ForEach-Object {
|
||||||
|
Remove-WinUtilAPPX -Name $psitem
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($sync.configs.tweaks.$CheckBox.InvokeScript){
|
||||||
|
$sync.configs.tweaks.$CheckBox.InvokeScript | ForEach-Object {
|
||||||
|
$Scriptblock = [scriptblock]::Create($psitem)
|
||||||
|
Invoke-WinUtilScript -ScriptBlock $scriptblock -Name $CheckBox
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
34
functions/private/Remove-WinUtilAPPX.ps1
Normal file
34
functions/private/Remove-WinUtilAPPX.ps1
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
function Remove-WinUtilAPPX {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
This function will remove any of the provided APPX names
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
Remove-WinUtilAPPX -Name "Microsoft.Microsoft3DViewer"
|
||||||
|
|
||||||
|
#>
|
||||||
|
param (
|
||||||
|
$Name
|
||||||
|
)
|
||||||
|
|
||||||
|
Try{
|
||||||
|
Write-Host "Removing $Name"
|
||||||
|
Get-AppxPackage "*$Name*" | Remove-AppxPackage -ErrorAction SilentlyContinue
|
||||||
|
Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like "*$Name*" | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
Catch [System.Exception] {
|
||||||
|
if($psitem.Exception.Message -like "*The requested operation requires elevation*"){
|
||||||
|
Write-Warning "Unable to uninstall $name due to a Security Exception"
|
||||||
|
}
|
||||||
|
Else{
|
||||||
|
Write-Warning "Unable to uninstall $name due to unhandled exception"
|
||||||
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Catch{
|
||||||
|
Write-Warning "Unable to uninstall $name due to unhandled exception"
|
||||||
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
|
}
|
||||||
|
}
|
32
functions/private/Set-WinUtilDNS.ps1
Normal file
32
functions/private/Set-WinUtilDNS.ps1
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
function Set-WinUtilDNS {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
This function will set the DNS of all interfaces that are in the "Up" state. It will lookup the values from the DNS.Json file
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
Set-WinUtilDNS -DNSProvider "google"
|
||||||
|
|
||||||
|
#>
|
||||||
|
param($DNSProvider)
|
||||||
|
if($DNSProvider -eq "Default"){return}
|
||||||
|
Try{
|
||||||
|
$Adapters = Get-NetAdapter | Where-Object {$_.Status -eq "Up"}
|
||||||
|
Write-Host "Ensuring DNS is set to $DNSProvider on the following interfaces"
|
||||||
|
Write-Host $($Adapters | Out-String)
|
||||||
|
|
||||||
|
Foreach ($Adapter in $Adapters){
|
||||||
|
if($DNSProvider -eq "DHCP"){
|
||||||
|
Set-DnsClientServerAddress -InterfaceIndex $Adapter.ifIndex -ResetServerAddresses
|
||||||
|
}
|
||||||
|
Else{
|
||||||
|
Set-DnsClientServerAddress -InterfaceIndex $Adapter.ifIndex -ServerAddresses ("$($sync.configs.dns.$DNSProvider.Primary)", "$($sync.configs.dns.$DNSProvider.Secondary)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Catch{
|
||||||
|
Write-Warning "Unable to set DNS Provider due to an unhandled exception"
|
||||||
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
|
}
|
||||||
|
}
|
40
functions/private/Set-WinUtilRegistry.ps1
Normal file
40
functions/private/Set-WinUtilRegistry.ps1
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
function Set-WinUtilRegistry {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
This function will make all modifications to the registry
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
Set-WinUtilRegistry -Name "PublishUserActivities" -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Type "DWord" -Value "0"
|
||||||
|
|
||||||
|
#>
|
||||||
|
param (
|
||||||
|
$Name,
|
||||||
|
$Path,
|
||||||
|
$Type,
|
||||||
|
$Value
|
||||||
|
)
|
||||||
|
|
||||||
|
Try{
|
||||||
|
if(!(Test-Path 'HKU:\')){New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS}
|
||||||
|
|
||||||
|
If (!(Test-Path $Path)) {
|
||||||
|
Write-Host "$Path was not found, Creating..."
|
||||||
|
New-Item -Path $Path -Force -ErrorAction Stop | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Set $Path\$Name to $Value"
|
||||||
|
Set-ItemProperty -Path $Path -Name $Name -Type $Type -Value $Value -Force -ErrorAction Stop | Out-Null
|
||||||
|
}
|
||||||
|
Catch [System.Security.SecurityException] {
|
||||||
|
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||||
|
}
|
||||||
|
Catch [System.Management.Automation.ItemNotFoundException] {
|
||||||
|
Write-Warning $psitem.Exception.ErrorRecord
|
||||||
|
}
|
||||||
|
Catch{
|
||||||
|
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||||
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
|
}
|
||||||
|
}
|
40
functions/private/Set-WinUtilScheduledTask.ps1
Normal file
40
functions/private/Set-WinUtilScheduledTask.ps1
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
function Set-WinUtilScheduledTask {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
This function will enable/disable the provided Scheduled Task
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
Set-WinUtilScheduledTask -Name "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" -State "Disabled"
|
||||||
|
|
||||||
|
#>
|
||||||
|
param (
|
||||||
|
$Name,
|
||||||
|
$State
|
||||||
|
)
|
||||||
|
|
||||||
|
Try{
|
||||||
|
if($State -eq "Disabled"){
|
||||||
|
Write-Host "Disabling Scheduled Task $Name"
|
||||||
|
Disable-ScheduledTask -TaskName $Name -ErrorAction Stop
|
||||||
|
}
|
||||||
|
if($State -eq "Enabled"){
|
||||||
|
Write-Host "Enabling Scheduled Task $Name"
|
||||||
|
Enable-ScheduledTask -TaskName $Name -ErrorAction Stop
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Catch [System.Exception]{
|
||||||
|
if($psitem.Exception.Message -like "*The system cannot find the file specified*"){
|
||||||
|
Write-Warning "Scheduled Task $name was not Found"
|
||||||
|
}
|
||||||
|
Else{
|
||||||
|
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||||
|
Write-Warning $psitem.Exception.Message
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Catch{
|
||||||
|
Write-Warning "Unable to run script for $name due to unhandled exception"
|
||||||
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
|
}
|
||||||
|
}
|
43
functions/private/Set-WinUtilService.ps1
Normal file
43
functions/private/Set-WinUtilService.ps1
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
Function Set-WinUtilService {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
This function will change the startup type of services and start/stop them as needed
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
Set-WinUtilService -Name "HomeGroupListener" -StartupType "Manual"
|
||||||
|
|
||||||
|
#>
|
||||||
|
param (
|
||||||
|
$Name,
|
||||||
|
$StartupType
|
||||||
|
)
|
||||||
|
Try{
|
||||||
|
Write-Host "Setting Services $Name to $StartupType"
|
||||||
|
Set-Service -Name $Name -StartupType $StartupType -ErrorAction Stop
|
||||||
|
|
||||||
|
if($StartupType -eq "Disabled"){
|
||||||
|
Write-Host "Stopping $Name"
|
||||||
|
Stop-Service -Name $Name -Force -ErrorAction Stop
|
||||||
|
}
|
||||||
|
if($StartupType -eq "Enabled"){
|
||||||
|
Write-Host "Starting $Name"
|
||||||
|
Start-Service -Name $Name -Force -ErrorAction Stop
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Catch [System.Exception]{
|
||||||
|
if($psitem.Exception.Message -like "*Cannot find any service with service name*" -or
|
||||||
|
$psitem.Exception.Message -like "*was not found on computer*"){
|
||||||
|
Write-Warning "Service $name was not Found"
|
||||||
|
}
|
||||||
|
Else{
|
||||||
|
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||||
|
Write-Warning $psitem.Exception.Message
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Catch{
|
||||||
|
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||||
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
|
}
|
||||||
|
}
|
27
functions/private/Test-WinUtilPackageManager.ps1
Normal file
27
functions/private/Test-WinUtilPackageManager.ps1
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
function Test-WinUtilPackageManager {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Checks for Winget or Choco depending on the paramater
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
Param(
|
||||||
|
[System.Management.Automation.SwitchParameter]$winget,
|
||||||
|
[System.Management.Automation.SwitchParameter]$choco
|
||||||
|
)
|
||||||
|
|
||||||
|
if($winget){
|
||||||
|
if (Test-Path ~\AppData\Local\Microsoft\WindowsApps\winget.exe) {
|
||||||
|
return $true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($choco){
|
||||||
|
if ((Get-Command -Name choco -ErrorAction Ignore) -and ($chocoVersion = (Get-Item "$env:ChocolateyInstall\choco.exe" -ErrorAction Ignore).VersionInfo.ProductVersion)){
|
||||||
|
return $true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $false
|
||||||
|
}
|
22
functions/private/Update-WinUtilProgramWinget.ps1
Normal file
22
functions/private/Update-WinUtilProgramWinget.ps1
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
Function Update-WinUtilProgramWinget {
|
||||||
|
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
This will update programs via Winget using a new powershell.exe instance to prevent the GUI from locking up.
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
[ScriptBlock]$wingetinstall = {
|
||||||
|
|
||||||
|
$host.ui.RawUI.WindowTitle = """Winget Install"""
|
||||||
|
|
||||||
|
Start-Transcript $ENV:TEMP\winget-update.log -Append
|
||||||
|
winget upgrade --all
|
||||||
|
|
||||||
|
Pause
|
||||||
|
}
|
||||||
|
|
||||||
|
$global:WinGetInstall = Start-Process -Verb runas powershell -ArgumentList "-command invoke-command -scriptblock {$wingetinstall} -argumentlist '$($ProgramsToInstall -join ",")'" -PassThru
|
||||||
|
|
||||||
|
}
|
49
functions/public/Invoke-WPFButton.ps1
Normal file
49
functions/public/Invoke-WPFButton.ps1
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
function Invoke-WPFButton {
|
||||||
|
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Meant to make creating buttons easier. There is a section below in the gui that will assign this function to every button.
|
||||||
|
This way you can dictate what each button does from this function.
|
||||||
|
|
||||||
|
Input will be the name of the button that is clicked.
|
||||||
|
#>
|
||||||
|
|
||||||
|
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){
|
||||||
|
|
||||||
|
"WPFTab?BT" {Invoke-WPFTab $Button}
|
||||||
|
"WPFinstall" {Invoke-WPFInstall}
|
||||||
|
"WPFInstallUpgrade" {Invoke-WPFInstallUpgrade}
|
||||||
|
"WPFdesktop" {Invoke-WPFPresets "Desktop"}
|
||||||
|
"WPFlaptop" {Invoke-WPFPresets "laptop"}
|
||||||
|
"WPFminimal" {Invoke-WPFPresets "minimal"}
|
||||||
|
"WPFexport" {Invoke-WPFImpex -type "export"}
|
||||||
|
"WPFimport" {Invoke-WPFImpex -type "import"}
|
||||||
|
"WPFclear" {Invoke-WPFPresets -preset $null -imported $true}
|
||||||
|
"WPFtweaksbutton" {Invoke-WPFtweaksbutton}
|
||||||
|
"WPFAddUltPerf" {Invoke-WPFUltimatePerformance -State "Enabled"}
|
||||||
|
"WPFRemoveUltPerf" {Invoke-WPFUltimatePerformance -State "Disabled"}
|
||||||
|
"WPFToggleDarkMode" {Invoke-WPFDarkMode -DarkMoveEnabled $(Get-WinUtilDarkMode)}
|
||||||
|
"WPFundoall" {Invoke-WPFundoall}
|
||||||
|
"WPFFeatureInstall" {Invoke-WPFFeatureInstall}
|
||||||
|
"WPFPanelDISM" {Invoke-WPFPanelDISM}
|
||||||
|
"WPFPanelAutologin" {Invoke-WPFPanelAutologin}
|
||||||
|
"WPFPanelcontrol" {Invoke-WPFControlPanel -Panel $button}
|
||||||
|
"WPFPanelnetwork" {Invoke-WPFControlPanel -Panel $button}
|
||||||
|
"WPFPanelpower" {Invoke-WPFControlPanel -Panel $button}
|
||||||
|
"WPFPanelsound" {Invoke-WPFControlPanel -Panel $button}
|
||||||
|
"WPFPanelsystem" {Invoke-WPFControlPanel -Panel $button}
|
||||||
|
"WPFPaneluser" {Invoke-WPFControlPanel -Panel $button}
|
||||||
|
"WPFUpdatesdefault" {Invoke-WPFUpdatesdefault}
|
||||||
|
"WPFFixesUpdate" {Invoke-WPFFixesUpdate}
|
||||||
|
"WPFUpdatesdisable" {Invoke-WPFUpdatesdisable}
|
||||||
|
"WPFUpdatessecurity" {Invoke-WPFUpdatessecurity}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
18
functions/public/Invoke-WPFControlPanel.ps1
Normal file
18
functions/public/Invoke-WPFControlPanel.ps1
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
function Invoke-WPFControlPanel {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Simple Switch for lagacy windows
|
||||||
|
|
||||||
|
#>
|
||||||
|
param($Panel)
|
||||||
|
|
||||||
|
switch ($Panel){
|
||||||
|
"WPFPanelcontrol" {cmd /c control}
|
||||||
|
"WPFPanelnetwork" {cmd /c ncpa.cpl}
|
||||||
|
"WPFPanelpower" {cmd /c powercfg.cpl}
|
||||||
|
"WPFPanelsound" {cmd /c mmsys.cpl}
|
||||||
|
"WPFPanelsystem" {cmd /c sysdm.cpl}
|
||||||
|
"WPFPaneluser" {cmd /c "control userpasswords2"}
|
||||||
|
}
|
||||||
|
}
|
33
functions/public/Invoke-WPFDarkMode.ps1
Normal file
33
functions/public/Invoke-WPFDarkMode.ps1
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
Function Invoke-WPFDarkMode {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Sets Dark Mode on or off
|
||||||
|
|
||||||
|
#>
|
||||||
|
Param($DarkMoveEnabled)
|
||||||
|
Try{
|
||||||
|
if ($DarkMoveEnabled -eq $false){
|
||||||
|
Write-Host "Enabling Dark Mode"
|
||||||
|
$DarkMoveValue = 0
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "Disabling Dark Mode"
|
||||||
|
$DarkMoveValue = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$Theme = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
||||||
|
Set-ItemProperty -Path $Theme -Name AppsUseLightTheme -Value $DarkMoveValue
|
||||||
|
Set-ItemProperty -Path $Theme -Name SystemUsesLightTheme -Value $DarkMoveValue
|
||||||
|
}
|
||||||
|
Catch [System.Security.SecurityException] {
|
||||||
|
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||||
|
}
|
||||||
|
Catch [System.Management.Automation.ItemNotFoundException] {
|
||||||
|
Write-Warning $psitem.Exception.ErrorRecord
|
||||||
|
}
|
||||||
|
Catch{
|
||||||
|
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||||
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
|
}
|
||||||
|
}
|
56
functions/public/Invoke-WPFFeatureInstall.ps1
Normal file
56
functions/public/Invoke-WPFFeatureInstall.ps1
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
function Invoke-WPFFeatureInstall {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
GUI Function to install Windows Features
|
||||||
|
|
||||||
|
#>
|
||||||
|
If ( $WPFFeaturesdotnet.IsChecked -eq $true ) {
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "NetFx4-AdvSrvs" -All -NoRestart
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "NetFx3" -All -NoRestart
|
||||||
|
}
|
||||||
|
If ( $WPFFeatureshyperv.IsChecked -eq $true ) {
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "HypervisorPlatform" -All -NoRestart
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Hyper-V-All" -All -NoRestart
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Hyper-V" -All -NoRestart
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Hyper-V-Tools-All" -All -NoRestart
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Hyper-V-Management-PowerShell" -All -NoRestart
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Hyper-V-Hypervisor" -All -NoRestart
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Hyper-V-Services" -All -NoRestart
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Hyper-V-Management-Clients" -All -NoRestart
|
||||||
|
cmd /c bcdedit /set hypervisorschedulertype classic
|
||||||
|
Write-Host "HyperV is now installed and configured. Please Reboot before using."
|
||||||
|
}
|
||||||
|
If ( $WPFFeatureslegacymedia.IsChecked -eq $true ) {
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "WindowsMediaPlayer" -All -NoRestart
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "MediaPlayback" -All -NoRestart
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "DirectPlay" -All -NoRestart
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "LegacyComponents" -All -NoRestart
|
||||||
|
}
|
||||||
|
If ( $WPFFeaturewsl.IsChecked -eq $true ) {
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "VirtualMachinePlatform" -All -NoRestart
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Windows-Subsystem-Linux" -All -NoRestart
|
||||||
|
Write-Host "WSL is now installed and configured. Please Reboot before using."
|
||||||
|
}
|
||||||
|
If ( $WPFFeaturenfs.IsChecked -eq $true ) {
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "ServicesForNFS-ClientOnly" -All -NoRestart
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "ClientForNFS-Infrastructure" -All -NoRestart
|
||||||
|
Enable-WindowsOptionalFeature -Online -FeatureName "NFS-Administration" -All -NoRestart
|
||||||
|
nfsadmin client stop
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default" -Name "AnonymousUID" -Type DWord -Value 0
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default" -Name "AnonymousGID" -Type DWord -Value 0
|
||||||
|
nfsadmin client start
|
||||||
|
nfsadmin client localhost config fileaccess=755 SecFlavors=+sys -krb5 -krb5i
|
||||||
|
Write-Host "NFS is now setup for user based NFS mounts"
|
||||||
|
}
|
||||||
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
|
$MessageboxTitle = "All features are now installed "
|
||||||
|
$Messageboxbody = ("Done")
|
||||||
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
|
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||||
|
|
||||||
|
Write-Host "================================="
|
||||||
|
Write-Host "--- Features are Installed ---"
|
||||||
|
Write-Host "================================="
|
||||||
|
}
|
111
functions/public/Invoke-WPFFixesUpdate.ps1
Normal file
111
functions/public/Invoke-WPFFixesUpdate.ps1
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
function Invoke-WPFFixesUpdate {
|
||||||
|
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
PlaceHolder
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
### Reset Windows Update Script - reregister dlls, services, and remove registry entires.
|
||||||
|
Write-Host "1. Stopping Windows Update Services..."
|
||||||
|
Stop-Service -Name BITS
|
||||||
|
Stop-Service -Name wuauserv
|
||||||
|
Stop-Service -Name appidsvc
|
||||||
|
Stop-Service -Name cryptsvc
|
||||||
|
|
||||||
|
Write-Host "2. Remove QMGR Data file..."
|
||||||
|
Remove-Item "$env:allusersprofile\Application Data\Microsoft\Network\Downloader\qmgr*.dat" -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
Write-Host "3. Renaming the Software Distribution and CatRoot Folder..."
|
||||||
|
Rename-Item $env:systemroot\SoftwareDistribution SoftwareDistribution.bak -ErrorAction SilentlyContinue
|
||||||
|
Rename-Item $env:systemroot\System32\Catroot2 catroot2.bak -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
Write-Host "4. Removing old Windows Update log..."
|
||||||
|
Remove-Item $env:systemroot\WindowsUpdate.log -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
Write-Host "5. Resetting the Windows Update Services to defualt settings..."
|
||||||
|
"sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)"
|
||||||
|
"sc.exe sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)"
|
||||||
|
Set-Location $env:systemroot\system32
|
||||||
|
|
||||||
|
Write-Host "6. Registering some DLLs..."
|
||||||
|
regsvr32.exe /s atl.dll
|
||||||
|
regsvr32.exe /s urlmon.dll
|
||||||
|
regsvr32.exe /s mshtml.dll
|
||||||
|
regsvr32.exe /s shdocvw.dll
|
||||||
|
regsvr32.exe /s browseui.dll
|
||||||
|
regsvr32.exe /s jscript.dll
|
||||||
|
regsvr32.exe /s vbscript.dll
|
||||||
|
regsvr32.exe /s scrrun.dll
|
||||||
|
regsvr32.exe /s msxml.dll
|
||||||
|
regsvr32.exe /s msxml3.dll
|
||||||
|
regsvr32.exe /s msxml6.dll
|
||||||
|
regsvr32.exe /s actxprxy.dll
|
||||||
|
regsvr32.exe /s softpub.dll
|
||||||
|
regsvr32.exe /s wintrust.dll
|
||||||
|
regsvr32.exe /s dssenh.dll
|
||||||
|
regsvr32.exe /s rsaenh.dll
|
||||||
|
regsvr32.exe /s gpkcsp.dll
|
||||||
|
regsvr32.exe /s sccbase.dll
|
||||||
|
regsvr32.exe /s slbcsp.dll
|
||||||
|
regsvr32.exe /s cryptdlg.dll
|
||||||
|
regsvr32.exe /s oleaut32.dll
|
||||||
|
regsvr32.exe /s ole32.dll
|
||||||
|
regsvr32.exe /s shell32.dll
|
||||||
|
regsvr32.exe /s initpki.dll
|
||||||
|
regsvr32.exe /s wuapi.dll
|
||||||
|
regsvr32.exe /s wuaueng.dll
|
||||||
|
regsvr32.exe /s wuaueng1.dll
|
||||||
|
regsvr32.exe /s wucltui.dll
|
||||||
|
regsvr32.exe /s wups.dll
|
||||||
|
regsvr32.exe /s wups2.dll
|
||||||
|
regsvr32.exe /s wuweb.dll
|
||||||
|
regsvr32.exe /s qmgr.dll
|
||||||
|
regsvr32.exe /s qmgrprxy.dll
|
||||||
|
regsvr32.exe /s wucltux.dll
|
||||||
|
regsvr32.exe /s muweb.dll
|
||||||
|
regsvr32.exe /s wuwebv.dll
|
||||||
|
|
||||||
|
Write-Host "7) Removing WSUS client settings..."
|
||||||
|
REG DELETE "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v AccountDomainSid /f
|
||||||
|
REG DELETE "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v PingID /f
|
||||||
|
REG DELETE "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientId /f
|
||||||
|
|
||||||
|
Write-Host "8) Resetting the WinSock..."
|
||||||
|
netsh winsock reset
|
||||||
|
netsh winhttp reset proxy
|
||||||
|
netsh int ip reset
|
||||||
|
|
||||||
|
Write-Host "9) Delete all BITS jobs..."
|
||||||
|
Get-BitsTransfer | Remove-BitsTransfer
|
||||||
|
|
||||||
|
Write-Host "10) Attempting to install the Windows Update Agent..."
|
||||||
|
If ([System.Environment]::Is64BitOperatingSystem) {
|
||||||
|
wusa Windows8-RT-KB2937636-x64 /quiet
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
wusa Windows8-RT-KB2937636-x86 /quiet
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "11) Starting Windows Update Services..."
|
||||||
|
Start-Service -Name BITS
|
||||||
|
Start-Service -Name wuauserv
|
||||||
|
Start-Service -Name appidsvc
|
||||||
|
Start-Service -Name cryptsvc
|
||||||
|
|
||||||
|
Write-Host "12) Forcing discovery..."
|
||||||
|
wuauclt /resetauthorization /detectnow
|
||||||
|
|
||||||
|
Write-Host "Process complete. Please reboot your computer."
|
||||||
|
|
||||||
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
|
$MessageboxTitle = "Reset Windows Update "
|
||||||
|
$Messageboxbody = ("Stock settings loaded.`n Please reboot your computer")
|
||||||
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
|
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||||
|
Write-Host "================================="
|
||||||
|
Write-Host "-- Reset ALL Updates to Factory -"
|
||||||
|
Write-Host "================================="
|
||||||
|
}
|
37
functions/public/Invoke-WPFFormVariables.ps1
Normal file
37
functions/public/Invoke-WPFFormVariables.ps1
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
Function Invoke-WPFFormVariables {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
PlaceHolder
|
||||||
|
|
||||||
|
#>
|
||||||
|
#If ($global:ReadmeDisplay -ne $true) { Write-Host "If you need to reference this display again, run Get-FormVariables" -ForegroundColor Yellow; $global:ReadmeDisplay = $true }
|
||||||
|
|
||||||
|
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host " CCCCCCCCCCCCCTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT "
|
||||||
|
Write-Host " CCC::::::::::::CT:::::::::::::::::::::TT:::::::::::::::::::::T "
|
||||||
|
Write-Host "CC:::::::::::::::CT:::::::::::::::::::::TT:::::::::::::::::::::T "
|
||||||
|
Write-Host "C:::::CCCCCCCC::::CT:::::TT:::::::TT:::::TT:::::TT:::::::TT:::::T "
|
||||||
|
Write-Host "C:::::C CCCCCCTTTTTT T:::::T TTTTTTTTTTTT T:::::T TTTTTT"
|
||||||
|
Write-Host "C:::::C T:::::T T:::::T "
|
||||||
|
Write-Host "C:::::C T:::::T T:::::T "
|
||||||
|
Write-Host "C:::::C T:::::T T:::::T "
|
||||||
|
Write-Host "C:::::C T:::::T T:::::T "
|
||||||
|
Write-Host "C:::::C T:::::T T:::::T "
|
||||||
|
Write-Host "C:::::C T:::::T T:::::T "
|
||||||
|
Write-Host "C:::::C CCCCCC T:::::T T:::::T "
|
||||||
|
Write-Host "C:::::CCCCCCCC::::C TT:::::::TT TT:::::::TT "
|
||||||
|
Write-Host "CC:::::::::::::::C T:::::::::T T:::::::::T "
|
||||||
|
Write-Host "CCC::::::::::::C T:::::::::T T:::::::::T "
|
||||||
|
Write-Host " CCCCCCCCCCCCC TTTTTTTTTTT TTTTTTTTTTT "
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host "====Chris Titus Tech====="
|
||||||
|
Write-Host "=====Windows Toolbox====="
|
||||||
|
|
||||||
|
|
||||||
|
#====DEBUG GUI Elements====
|
||||||
|
|
||||||
|
#Write-Host "Found the following interactable elements from our form" -ForegroundColor Cyan
|
||||||
|
#get-variable WPF*
|
||||||
|
}
|
37
functions/public/Invoke-WPFImpex.ps1
Normal file
37
functions/public/Invoke-WPFImpex.ps1
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
function Invoke-WPFImpex {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
This function handles importing and exporting of the checkboxes checked for the tweaks section
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
Invoke-WPFImpex -type "export"
|
||||||
|
|
||||||
|
#>
|
||||||
|
param($type)
|
||||||
|
|
||||||
|
if ($type -eq "export"){
|
||||||
|
$FileBrowser = New-Object System.Windows.Forms.SaveFileDialog
|
||||||
|
}
|
||||||
|
if ($type -eq "import"){
|
||||||
|
$FileBrowser = New-Object System.Windows.Forms.OpenFileDialog
|
||||||
|
}
|
||||||
|
|
||||||
|
$FileBrowser.InitialDirectory = [Environment]::GetFolderPath('Desktop')
|
||||||
|
$FileBrowser.Filter = "JSON Files (*.json)|*.json"
|
||||||
|
$FileBrowser.ShowDialog() | Out-Null
|
||||||
|
|
||||||
|
if($FileBrowser.FileName -eq ""){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($type -eq "export"){
|
||||||
|
$jsonFile = Get-WinUtilCheckBoxes WPFTweaks -unCheck $false
|
||||||
|
$jsonFile | ConvertTo-Json | Out-File $FileBrowser.FileName -Force
|
||||||
|
}
|
||||||
|
if ($type -eq "import"){
|
||||||
|
$jsonFile = Get-Content $FileBrowser.FileName | ConvertFrom-Json
|
||||||
|
Invoke-WPFPresets -preset $jsonFile -imported $true
|
||||||
|
}
|
||||||
|
}
|
52
functions/public/Invoke-WPFInstall.ps1
Normal file
52
functions/public/Invoke-WPFInstall.ps1
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
function Invoke-WPFInstall {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
PlaceHolder
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
if($sync.ProcessRunning){
|
||||||
|
$msg = "Install process is currently running."
|
||||||
|
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
$WingetInstall = Get-WinUtilCheckBoxes -Group "WPFInstall"
|
||||||
|
|
||||||
|
if ($wingetinstall.Count -eq 0) {
|
||||||
|
$WarningMsg = "Please select the program(s) to install"
|
||||||
|
[System.Windows.MessageBox]::Show($WarningMsg, $AppTitle, [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
Invoke-WPFRunspace -ArgumentList $WingetInstall -scriptblock {
|
||||||
|
param($WingetInstall)
|
||||||
|
try{
|
||||||
|
$sync.ProcessRunning = $true
|
||||||
|
|
||||||
|
# Ensure winget is installed
|
||||||
|
Install-WinUtilWinget
|
||||||
|
|
||||||
|
# Install all winget programs in new window
|
||||||
|
Install-WinUtilProgramWinget -ProgramsToInstall $WingetInstall
|
||||||
|
|
||||||
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
|
$MessageboxTitle = "Installs are Finished "
|
||||||
|
$Messageboxbody = ("Done")
|
||||||
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
|
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||||
|
|
||||||
|
Write-Host "==========================================="
|
||||||
|
Write-Host "-- Installs have finished ---"
|
||||||
|
Write-Host "==========================================="
|
||||||
|
}
|
||||||
|
Catch {
|
||||||
|
Write-Host "==========================================="
|
||||||
|
Write-Host "-- Winget failed to install ---"
|
||||||
|
Write-Host "==========================================="
|
||||||
|
}
|
||||||
|
$sync.ProcessRunning = $False
|
||||||
|
}
|
||||||
|
}
|
27
functions/public/Invoke-WPFInstallUpgrade.ps1
Normal file
27
functions/public/Invoke-WPFInstallUpgrade.ps1
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
function Invoke-WPFInstallUpgrade {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
PlaceHolder
|
||||||
|
|
||||||
|
#>
|
||||||
|
if(!(Test-WinUtilPackageManager -winget)){
|
||||||
|
Write-Host "==========================================="
|
||||||
|
Write-Host "-- Winget is not installed ---"
|
||||||
|
Write-Host "==========================================="
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Get-WinUtilInstallerProcess -Process $global:WinGetInstall){
|
||||||
|
$msg = "Install process is currently running. Please check for a powershell window labled 'Winget Install'"
|
||||||
|
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
Update-WinUtilProgramWinget
|
||||||
|
|
||||||
|
Write-Host "==========================================="
|
||||||
|
Write-Host "-- Updates started ---"
|
||||||
|
Write-Host "-- You can close this window if desired ---"
|
||||||
|
Write-Host "==========================================="
|
||||||
|
}
|
10
functions/public/Invoke-WPFPanelAutologin.ps1
Normal file
10
functions/public/Invoke-WPFPanelAutologin.ps1
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
function Invoke-WPFPanelAutologin {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
PlaceHolder
|
||||||
|
|
||||||
|
#>
|
||||||
|
curl.exe -ss "https://live.sysinternals.com/Autologon.exe" -o $env:temp\autologin.exe # Official Microsoft recommendation https://learn.microsoft.com/en-us/sysinternals/downloads/autologon
|
||||||
|
cmd /c $env:temp\autologin.exe
|
||||||
|
}
|
13
functions/public/Invoke-WPFPanelDISM.ps1
Normal file
13
functions/public/Invoke-WPFPanelDISM.ps1
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
function Invoke-WPFPanelDISM {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
PlaceHolder
|
||||||
|
|
||||||
|
#>
|
||||||
|
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
|
||||||
|
}
|
31
functions/public/Invoke-WPFPresets.ps1
Normal file
31
functions/public/Invoke-WPFPresets.ps1
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
function Invoke-WPFPresets {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Meant to make settings presets easier in the tweaks tab. Will pull the data from config/preset.json
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
param(
|
||||||
|
$preset,
|
||||||
|
[bool]$imported = $false
|
||||||
|
)
|
||||||
|
if($imported -eq $true){
|
||||||
|
$CheckBoxesToCheck = $preset
|
||||||
|
}
|
||||||
|
Else{
|
||||||
|
$CheckBoxesToCheck = $sync.configs.preset.$preset
|
||||||
|
}
|
||||||
|
|
||||||
|
#Uncheck all
|
||||||
|
get-variable | Where-Object {$_.name -like "*tweaks*"} | ForEach-Object {
|
||||||
|
if ($psitem.value.gettype().name -eq "CheckBox"){
|
||||||
|
$CheckBox = Get-Variable $psitem.Name
|
||||||
|
if ($CheckBoxesToCheck -contains $CheckBox.name){
|
||||||
|
$checkbox.value.ischecked = $true
|
||||||
|
}
|
||||||
|
else{$checkbox.value.ischecked = $false}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
73
functions/public/Invoke-WPFRunspace.ps1
Normal file
73
functions/public/Invoke-WPFRunspace.ps1
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
function Invoke-WPFRunspace {
|
||||||
|
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Simple function to make it easier to invoke a runspace from inside the script.
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
$params = @{
|
||||||
|
ScriptBlock = $sync.ScriptsInstallPrograms
|
||||||
|
ArgumentList = "Installadvancedip,Installbitwarden"
|
||||||
|
Verbose = $true
|
||||||
|
}
|
||||||
|
|
||||||
|
Invoke-WPFRunspace @params
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
[CmdletBinding()]
|
||||||
|
Param (
|
||||||
|
$ScriptBlock,
|
||||||
|
$ArgumentList
|
||||||
|
)
|
||||||
|
|
||||||
|
#Configure max thread count for RunspacePool.
|
||||||
|
$maxthreads = [int]$env:NUMBER_OF_PROCESSORS
|
||||||
|
|
||||||
|
#Create a new session state for parsing variables ie hashtable into our runspace.
|
||||||
|
$hashVars = New-object System.Management.Automation.Runspaces.SessionStateVariableEntry -ArgumentList 'sync',$sync,$Null
|
||||||
|
$InitialSessionState = [System.Management.Automation.Runspaces.InitialSessionState]::CreateDefault()
|
||||||
|
|
||||||
|
#Add the variable to the RunspacePool sessionstate
|
||||||
|
$InitialSessionState.Variables.Add($hashVars)
|
||||||
|
|
||||||
|
#Add functions
|
||||||
|
$functions = Get-ChildItem function:\ | Where-Object {$_.name -like "*winutil*" -or $_.name -like "*WPF*"}
|
||||||
|
foreach ($function in $functions){
|
||||||
|
$functionDefinition = Get-Content function:\$($function.name)
|
||||||
|
$functionEntry = New-Object System.Management.Automation.Runspaces.SessionStateFunctionEntry -ArgumentList $($function.name), $functionDefinition
|
||||||
|
|
||||||
|
# And add it to the iss object
|
||||||
|
$initialSessionState.Commands.Add($functionEntry)
|
||||||
|
}
|
||||||
|
|
||||||
|
#Create our runspace pool. We are entering three parameters here min thread count, max thread count and host machine of where these runspaces should be made.
|
||||||
|
$script:runspace = [runspacefactory]::CreateRunspacePool(1,$maxthreads,$InitialSessionState, $Host)
|
||||||
|
|
||||||
|
|
||||||
|
#Crate a PowerShell instance.
|
||||||
|
$script:powershell = [powershell]::Create()
|
||||||
|
|
||||||
|
#Open a RunspacePool instance.
|
||||||
|
$script:runspace.Open()
|
||||||
|
|
||||||
|
#Add Scriptblock and Arguments to runspace
|
||||||
|
$script:powershell.AddScript($ScriptBlock)
|
||||||
|
$script:powershell.AddArgument($ArgumentList)
|
||||||
|
$script:powershell.RunspacePool = $script:runspace
|
||||||
|
|
||||||
|
#Run our RunspacePool.
|
||||||
|
$script:handle = $script:powershell.BeginInvoke()
|
||||||
|
|
||||||
|
#Cleanup our RunspacePool threads when they are complete ie. GC.
|
||||||
|
if ($script:handle.IsCompleted)
|
||||||
|
{
|
||||||
|
$script:powershell.EndInvoke($script:handle)
|
||||||
|
$script:powershell.Dispose()
|
||||||
|
$script:runspace.Dispose()
|
||||||
|
$script:runspace.Close()
|
||||||
|
[System.GC]::Collect()
|
||||||
|
}
|
||||||
|
}
|
24
functions/public/Invoke-WPFTab.ps1
Normal file
24
functions/public/Invoke-WPFTab.ps1
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
function Invoke-WPFTab {
|
||||||
|
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Sole purpose of this fuction reduce duplicated code for switching between tabs.
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
Param ($ClickedTab)
|
||||||
|
$Tabs = Get-Variable WPFTab?BT
|
||||||
|
$TabNav = Get-Variable WPFTabNav
|
||||||
|
$x = [int]($ClickedTab -replace "WPFTab","" -replace "BT","") - 1
|
||||||
|
|
||||||
|
0..($Tabs.Count -1 ) | ForEach-Object {
|
||||||
|
|
||||||
|
if ($x -eq $psitem){
|
||||||
|
$TabNav.value.Items[$psitem].IsSelected = $true
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$TabNav.value.Items[$psitem].IsSelected = $false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
functions/public/Invoke-WPFUltimatePerformance.ps1
Normal file
30
functions/public/Invoke-WPFUltimatePerformance.ps1
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
Function Invoke-WPFUltimatePerformance {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
PlaceHolder
|
||||||
|
|
||||||
|
#>
|
||||||
|
param($State)
|
||||||
|
Try{
|
||||||
|
$guid = "e9a42b02-d5df-448d-aa00-03f14749eb61"
|
||||||
|
|
||||||
|
if($state -eq "Enabled"){
|
||||||
|
Write-Host "Adding Ultimate Performance Profile"
|
||||||
|
[scriptblock]$command = {powercfg -duplicatescheme $guid}
|
||||||
|
|
||||||
|
}
|
||||||
|
if($state -eq "Disabled"){
|
||||||
|
Write-Host "Removing Ultimate Performance Profile"
|
||||||
|
[scriptblock]$command = {powercfg -delete $guid}
|
||||||
|
}
|
||||||
|
|
||||||
|
$output = Invoke-Command -ScriptBlock $command
|
||||||
|
if($output -like "*does not exist*"){
|
||||||
|
throw [GenericException]::new('Failed to modify profile')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Catch{
|
||||||
|
Write-Warning $psitem.Exception.Message
|
||||||
|
}
|
||||||
|
}
|
45
functions/public/Invoke-WPFUpdatesdefault.ps1
Normal file
45
functions/public/Invoke-WPFUpdatesdefault.ps1
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
function Invoke-WPFUpdatesdefault {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
PlaceHolder
|
||||||
|
|
||||||
|
#>
|
||||||
|
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-Host "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-Host "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-Host "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-Host "================================="
|
||||||
|
Write-Host "--- Updates Set to Default ---"
|
||||||
|
Write-Host "================================="
|
||||||
|
}
|
32
functions/public/Invoke-WPFUpdatesdisable.ps1
Normal file
32
functions/public/Invoke-WPFUpdatesdisable.ps1
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
function Invoke-WPFUpdatesdisable {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
PlaceHolder
|
||||||
|
|
||||||
|
#>
|
||||||
|
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 1
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -Type DWord -Value 1
|
||||||
|
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 0
|
||||||
|
|
||||||
|
$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 Disabled"
|
||||||
|
Get-Service -Name $service -ErrorAction SilentlyContinue | Set-Service -StartupType Disabled
|
||||||
|
}
|
||||||
|
Write-Host "================================="
|
||||||
|
Write-Host "--- Updates ARE DISABLED ---"
|
||||||
|
Write-Host "================================="
|
||||||
|
}
|
43
functions/public/Invoke-WPFUpdatessecurity.ps1
Normal file
43
functions/public/Invoke-WPFUpdatessecurity.ps1
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
function Invoke-WPFUpdatessecurity {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
PlaceHolder
|
||||||
|
|
||||||
|
#>
|
||||||
|
Write-Host "Disabling driver offering through Windows Update..."
|
||||||
|
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata")) {
|
||||||
|
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Force | Out-Null
|
||||||
|
}
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Name "PreventDeviceMetadataFromNetwork" -Type DWord -Value 1
|
||||||
|
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching")) {
|
||||||
|
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Force | Out-Null
|
||||||
|
}
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontPromptForWindowsUpdate" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontSearchWindowsUpdate" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DriverUpdateWizardWuSearchEnabled" -Type DWord -Value 0
|
||||||
|
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate")) {
|
||||||
|
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" | Out-Null
|
||||||
|
}
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -Type DWord -Value 1
|
||||||
|
Write-Host "Disabling Windows Update automatic restart..."
|
||||||
|
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 "NoAutoRebootWithLoggedOnUsers" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUPowerManagement" -Type DWord -Value 0
|
||||||
|
Write-Host "Disabled driver offering through Windows Update"
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "BranchReadinessLevel" -Type DWord -Value 20
|
||||||
|
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
|
||||||
|
|
||||||
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
|
$MessageboxTitle = "Set Security Updates"
|
||||||
|
$Messageboxbody = ("Recommended Update settings loaded")
|
||||||
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
|
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||||
|
Write-Host "================================="
|
||||||
|
Write-Host "-- Updates Set to Recommended ---"
|
||||||
|
Write-Host "================================="
|
||||||
|
}
|
40
functions/public/Invoke-WPFtweaksbutton.ps1
Normal file
40
functions/public/Invoke-WPFtweaksbutton.ps1
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
function Invoke-WPFtweaksbutton {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
PlaceHolder
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
if($sync.ProcessRunning){
|
||||||
|
$msg = "Install process is currently running."
|
||||||
|
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
$Tweaks = Get-WinUtilCheckBoxes -Group "WPFTweaks"
|
||||||
|
|
||||||
|
Set-WinUtilDNS -DNSProvider $WPFchangedns.text
|
||||||
|
|
||||||
|
Invoke-WPFRunspace -ArgumentList $Tweaks -ScriptBlock {
|
||||||
|
param($Tweaks)
|
||||||
|
|
||||||
|
$sync.ProcessRunning = $true
|
||||||
|
|
||||||
|
Foreach ($tweak in $tweaks){
|
||||||
|
Invoke-WinUtilTweaks $tweak
|
||||||
|
}
|
||||||
|
|
||||||
|
$sync.ProcessRunning = $false
|
||||||
|
Write-Host "================================="
|
||||||
|
Write-Host "-- Tweaks are Finished ---"
|
||||||
|
Write-Host "================================="
|
||||||
|
|
||||||
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
|
$MessageboxTitle = "Tweaks are Finished "
|
||||||
|
$Messageboxbody = ("Done")
|
||||||
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
|
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||||
|
}
|
||||||
|
}
|
190
functions/public/Invoke-WPFundoall.ps1
Normal file
190
functions/public/Invoke-WPFundoall.ps1
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
function Invoke-WPFundoall {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
PlaceHolder
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
if($sync.ProcessRunning){
|
||||||
|
$msg = "Install process is currently running."
|
||||||
|
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
$Tweaks = Get-WinUtilCheckBoxes -Group "WPFTweaks"
|
||||||
|
|
||||||
|
Invoke-WPFRunspace -ArgumentList $Tweaks -ScriptBlock {
|
||||||
|
param($Tweaks)
|
||||||
|
|
||||||
|
$sync.ProcessRunning = $true
|
||||||
|
|
||||||
|
Foreach ($tweak in $tweaks){
|
||||||
|
Invoke-WinUtilTweaks $tweak -undo $true
|
||||||
|
}
|
||||||
|
|
||||||
|
$sync.ProcessRunning = $false
|
||||||
|
Write-Host "=================================="
|
||||||
|
Write-Host "--- Undo Tweaks are Finished ---"
|
||||||
|
Write-Host "=================================="
|
||||||
|
|
||||||
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
|
$MessageboxTitle = "Tweaks are Finished "
|
||||||
|
$Messageboxbody = ("Done")
|
||||||
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
|
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||||
|
}
|
||||||
|
|
||||||
|
<#
|
||||||
|
|
||||||
|
Write-Host "Creating Restore Point in case something bad happens"
|
||||||
|
Enable-ComputerRestore -Drive "$env:SystemDrive"
|
||||||
|
Checkpoint-Computer -Description "RestorePoint1" -RestorePointType "MODIFY_SETTINGS"
|
||||||
|
|
||||||
|
Write-Host "Enabling Telemetry..."
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 1
|
||||||
|
Write-Host "Enabling Wi-Fi Sense"
|
||||||
|
Set-ItemProperty -Path "HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" -Name "Value" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" -Name "Value" -Type DWord -Value 1
|
||||||
|
Write-Host "Enabling Application suggestions..."
|
||||||
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "ContentDeliveryAllowed" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "OemPreInstalledAppsEnabled" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "PreInstalledAppsEnabled" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "PreInstalledAppsEverEnabled" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SilentInstalledAppsEnabled" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338387Enabled" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338388Enabled" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338389Enabled" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-353698Enabled" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SystemPaneSuggestionsEnabled" -Type DWord -Value 1
|
||||||
|
If (Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent") {
|
||||||
|
Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Recurse -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -Type DWord -Value 0
|
||||||
|
Write-Host "Enabling Activity History..."
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "EnableActivityFeed" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "PublishUserActivities" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "UploadUserActivities" -Type DWord -Value 1
|
||||||
|
Write-Host "Enable Location Tracking..."
|
||||||
|
If (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location") {
|
||||||
|
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Recurse -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Name "Value" -Type String -Value "Allow"
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" -Name "SensorPermissionState" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" -Name "Status" -Type DWord -Value 1
|
||||||
|
Write-Host "Enabling automatic Maps updates..."
|
||||||
|
Set-ItemProperty -Path "HKLM:\SYSTEM\Maps" -Name "AutoUpdateEnabled" -Type DWord -Value 1
|
||||||
|
Write-Host "Enabling Feedback..."
|
||||||
|
If (Test-Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules") {
|
||||||
|
Remove-Item -Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules" -Recurse -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules" -Name "NumberOfSIUFInPeriod" -Type DWord -Value 0
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "DoNotShowFeedbackNotifications" -Type DWord -Value 0
|
||||||
|
Write-Host "Enabling Tailored Experiences..."
|
||||||
|
If (Test-Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CloudContent") {
|
||||||
|
Remove-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Recurse -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableTailoredExperiencesWithDiagnosticData" -Type DWord -Value 0
|
||||||
|
Write-Host "Disabling Advertising ID..."
|
||||||
|
If (Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo") {
|
||||||
|
Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" -Recurse -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" -Name "DisabledByGroupPolicy" -Type DWord -Value 0
|
||||||
|
Write-Host "Allow Error reporting..."
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "Disabled" -Type DWord -Value 0
|
||||||
|
Write-Host "Allowing Diagnostics Tracking Service..."
|
||||||
|
Stop-Service "DiagTrack" -WarningAction SilentlyContinue
|
||||||
|
Set-Service "DiagTrack" -StartupType Manual
|
||||||
|
Write-Host "Allowing WAP Push Service..."
|
||||||
|
Stop-Service "dmwappushservice" -WarningAction SilentlyContinue
|
||||||
|
Set-Service "dmwappushservice" -StartupType Manual
|
||||||
|
Write-Host "Allowing Home Groups services..."
|
||||||
|
Stop-Service "HomeGroupListener" -WarningAction SilentlyContinue
|
||||||
|
Set-Service "HomeGroupListener" -StartupType Manual
|
||||||
|
Stop-Service "HomeGroupProvider" -WarningAction SilentlyContinue
|
||||||
|
Set-Service "HomeGroupProvider" -StartupType Manual
|
||||||
|
Write-Host "Enabling Storage Sense..."
|
||||||
|
New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" | Out-Null
|
||||||
|
Write-Host "Allowing Superfetch service..."
|
||||||
|
Stop-Service "SysMain" -WarningAction SilentlyContinue
|
||||||
|
Set-Service "SysMain" -StartupType Manual
|
||||||
|
Write-Host "Setting BIOS time to Local Time instead of UTC..."
|
||||||
|
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -Type DWord -Value 0
|
||||||
|
Write-Host "Enabling Hibernation..."
|
||||||
|
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Session Manager\Power" -Name "HibernteEnabled" -Type Dword -Value 1
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" -Name "ShowHibernateOption" -Type Dword -Value 1
|
||||||
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" -Name "NoLockScreen" -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
Write-Host "Hiding file operations details..."
|
||||||
|
If (Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager") {
|
||||||
|
Remove-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" -Recurse -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" -Name "EnthusiastMode" -Type DWord -Value 0
|
||||||
|
Write-Host "Showing Task View button..."
|
||||||
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowTaskViewButton" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" -Name "PeopleBand" -Type DWord -Value 1
|
||||||
|
|
||||||
|
Write-Host "Changing default Explorer view to Quick Access..."
|
||||||
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "LaunchTo" -Type DWord -Value 0
|
||||||
|
|
||||||
|
Write-Host "Unrestricting AutoLogger directory"
|
||||||
|
$autoLoggerDir = "$env:PROGRAMDATA\Microsoft\Diagnosis\ETLLogs\AutoLogger"
|
||||||
|
icacls $autoLoggerDir /grant:r SYSTEM:`(OI`)`(CI`)F | Out-Null
|
||||||
|
|
||||||
|
Write-Host "Enabling and starting Diagnostics Tracking Service"
|
||||||
|
Set-Service "DiagTrack" -StartupType Automatic
|
||||||
|
Start-Service "DiagTrack"
|
||||||
|
|
||||||
|
Write-Host "Hiding known file extensions"
|
||||||
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "HideFileExt" -Type DWord -Value 1
|
||||||
|
|
||||||
|
Write-Host "Reset Local Group Policies to Stock Defaults"
|
||||||
|
# cmd /c secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose
|
||||||
|
cmd /c RD /S /Q "%WinDir%\System32\GroupPolicyUsers"
|
||||||
|
cmd /c RD /S /Q "%WinDir%\System32\GroupPolicy"
|
||||||
|
cmd /c gpupdate /force
|
||||||
|
# Considered using Invoke-GPUpdate but requires module most people won't have installed
|
||||||
|
|
||||||
|
Write-Host "Adjusting visual effects for appearance..."
|
||||||
|
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "DragFullWindows" -Type String -Value 1
|
||||||
|
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type String -Value 400
|
||||||
|
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "UserPreferencesMask" -Type Binary -Value ([byte[]](158, 30, 7, 128, 18, 0, 0, 0))
|
||||||
|
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\WindowMetrics" -Name "MinAnimate" -Type String -Value 1
|
||||||
|
Set-ItemProperty -Path "HKCU:\Control Panel\Keyboard" -Name "KeyboardDelay" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewAlphaSelect" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewShadow" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarAnimations" -Type DWord -Value 1
|
||||||
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" -Name "VisualFXSetting" -Type DWord -Value 3
|
||||||
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "EnableAeroPeek" -Type DWord -Value 1
|
||||||
|
Remove-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "HungAppTimeout" -ErrorAction SilentlyContinue
|
||||||
|
Write-Host "Restoring Clipboard History..."
|
||||||
|
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Clipboard" -Name "EnableClipboardHistory" -ErrorAction SilentlyContinue
|
||||||
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "AllowClipboardHistory" -ErrorAction SilentlyContinue
|
||||||
|
Write-Host "Enabling Notifications and Action Center"
|
||||||
|
Remove-Item -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Force
|
||||||
|
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled"
|
||||||
|
Write-Host "Restoring Default Right Click Menu Layout"
|
||||||
|
Remove-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" -Recurse -Confirm:$false -Force
|
||||||
|
|
||||||
|
Write-Host "Reset News and Interests"
|
||||||
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds" -Name "EnableFeeds" -Type DWord -Value 1
|
||||||
|
# Remove "News and Interest" from taskbar
|
||||||
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Feeds" -Name "ShellFeedsTaskbarViewMode" -Type DWord -Value 0
|
||||||
|
Write-Host "Done - Reverted to Stock Settings"
|
||||||
|
|
||||||
|
Write-Host "Essential Undo Completed"
|
||||||
|
|
||||||
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
|
$MessageboxTitle = "Undo All"
|
||||||
|
$Messageboxbody = ("Done")
|
||||||
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
|
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||||
|
|
||||||
|
Write-Host "================================="
|
||||||
|
Write-Host "--- Undo All is Finished ---"
|
||||||
|
Write-Host "================================="
|
||||||
|
#>
|
||||||
|
}
|
25
lint/PSScriptAnalyser.ps1
Normal file
25
lint/PSScriptAnalyser.ps1
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
@{
|
||||||
|
# Only diagnostic records of the specified severity will be generated.
|
||||||
|
# Uncomment the following line if you only want Errors and Warnings but
|
||||||
|
# not Information diagnostic records.
|
||||||
|
# Severity = @('Error','Warning')
|
||||||
|
|
||||||
|
# Analyze **only** the following rules. Use IncludeRules when you want
|
||||||
|
# to invoke only a small subset of the defualt rules.
|
||||||
|
<#
|
||||||
|
IncludeRules = @('PSAvoidDefaultValueSwitchParameter',
|
||||||
|
'PSMisleadingBacktick',
|
||||||
|
'PSMissingModuleManifestField',
|
||||||
|
'PSReservedCmdletChar',
|
||||||
|
'PSReservedParams',
|
||||||
|
'PSShouldProcess',
|
||||||
|
'PSUseApprovedVerbs',
|
||||||
|
'PSUseDeclaredVarsMoreThanAssigments')
|
||||||
|
#>
|
||||||
|
# Do not analyze the following rules. Use ExcludeRules when you have
|
||||||
|
# commented out the IncludeRules settings above and want to include all
|
||||||
|
# the default rules except for those you exclude below.
|
||||||
|
# Note: if a rule is in both IncludeRules and ExcludeRules, the rule
|
||||||
|
# will be excluded.
|
||||||
|
ExcludeRules = @('PSAvoidUsingWriteHost')
|
||||||
|
}
|
237
ooshutup10_winutil_settings.cfg
Normal file
237
ooshutup10_winutil_settings.cfg
Normal file
@ -0,0 +1,237 @@
|
|||||||
|
############################################################################
|
||||||
|
# This file was created with O&O ShutUp10++ V1.9.1434
|
||||||
|
# and can be imported onto another computer.
|
||||||
|
#
|
||||||
|
# Download the application at https://www.oo-software.com/shutup10
|
||||||
|
# You can then import the file from within the program.
|
||||||
|
#
|
||||||
|
# Alternatively you can import it automatically over a command line.
|
||||||
|
# Simply use the following parameter:
|
||||||
|
# OOSU10.exe <path to file>
|
||||||
|
#
|
||||||
|
# Selecting the Option /quiet ends the app right after the import and the
|
||||||
|
# user does not get any feedback about the import.
|
||||||
|
#
|
||||||
|
# We are always happy to answer any questions you may have!
|
||||||
|
# © 2015-2022 O&O Software GmbH, Berlin. All rights reserved.
|
||||||
|
# https://www.oo-software.com/
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
P001 +
|
||||||
|
P002 +
|
||||||
|
P003 +
|
||||||
|
P004 +
|
||||||
|
P005 +
|
||||||
|
P006 +
|
||||||
|
P008 +
|
||||||
|
P026 +
|
||||||
|
P027 +
|
||||||
|
P028 +
|
||||||
|
P064 +
|
||||||
|
P065 +
|
||||||
|
P066 +
|
||||||
|
P067 +
|
||||||
|
P070 +
|
||||||
|
P069 +
|
||||||
|
P009 -
|
||||||
|
P010 -
|
||||||
|
P015 +
|
||||||
|
P068 -
|
||||||
|
P016 -
|
||||||
|
A001 +
|
||||||
|
A002 +
|
||||||
|
A003 +
|
||||||
|
A004 -
|
||||||
|
A006 -
|
||||||
|
A005 +
|
||||||
|
P007 +
|
||||||
|
P036 +
|
||||||
|
P025 +
|
||||||
|
P033 +
|
||||||
|
P023 +
|
||||||
|
P056 +
|
||||||
|
P057 -
|
||||||
|
P012 -
|
||||||
|
P034 -
|
||||||
|
P013 -
|
||||||
|
P035 -
|
||||||
|
P062 -
|
||||||
|
P063 -
|
||||||
|
P081 +
|
||||||
|
P047 -
|
||||||
|
P019 -
|
||||||
|
P048 -
|
||||||
|
P049 -
|
||||||
|
P020 -
|
||||||
|
P037 -
|
||||||
|
P011 -
|
||||||
|
P038 -
|
||||||
|
P050 -
|
||||||
|
P051 -
|
||||||
|
P018 -
|
||||||
|
P039 -
|
||||||
|
P021 -
|
||||||
|
P040 -
|
||||||
|
P022 -
|
||||||
|
P041 -
|
||||||
|
P014 -
|
||||||
|
P042 -
|
||||||
|
P052 -
|
||||||
|
P053 -
|
||||||
|
P054 -
|
||||||
|
P055 -
|
||||||
|
P029 -
|
||||||
|
P043 -
|
||||||
|
P030 -
|
||||||
|
P044 -
|
||||||
|
P031 -
|
||||||
|
P045 -
|
||||||
|
P032 -
|
||||||
|
P046 -
|
||||||
|
P058 -
|
||||||
|
P059 -
|
||||||
|
P060 -
|
||||||
|
P061 -
|
||||||
|
P071 -
|
||||||
|
P072 -
|
||||||
|
P073 -
|
||||||
|
P074 -
|
||||||
|
P075 -
|
||||||
|
P076 -
|
||||||
|
P077 -
|
||||||
|
P078 -
|
||||||
|
P079 -
|
||||||
|
P080 -
|
||||||
|
P024 +
|
||||||
|
S001 +
|
||||||
|
S002 +
|
||||||
|
S003 +
|
||||||
|
S008 -
|
||||||
|
E101 +
|
||||||
|
E201 -
|
||||||
|
E115 +
|
||||||
|
E215 -
|
||||||
|
E118 +
|
||||||
|
E218 -
|
||||||
|
E107 +
|
||||||
|
E207 -
|
||||||
|
E111 +
|
||||||
|
E211 -
|
||||||
|
E112 +
|
||||||
|
E212 +
|
||||||
|
E109 +
|
||||||
|
E209 +
|
||||||
|
E121 +
|
||||||
|
E221 -
|
||||||
|
E103 +
|
||||||
|
E203 -
|
||||||
|
E123 -
|
||||||
|
E223 +
|
||||||
|
E124 -
|
||||||
|
E224 -
|
||||||
|
E119 -
|
||||||
|
E219 -
|
||||||
|
E120 -
|
||||||
|
E220 -
|
||||||
|
E122 -
|
||||||
|
E222 -
|
||||||
|
E125 -
|
||||||
|
E225 -
|
||||||
|
E126 -
|
||||||
|
E226 -
|
||||||
|
E106 -
|
||||||
|
E206 -
|
||||||
|
E127 -
|
||||||
|
E227 -
|
||||||
|
E001 +
|
||||||
|
E002 +
|
||||||
|
E003 +
|
||||||
|
E008 +
|
||||||
|
E007 +
|
||||||
|
E010 +
|
||||||
|
E011 +
|
||||||
|
E012 +
|
||||||
|
E009 -
|
||||||
|
E004 -
|
||||||
|
E005 -
|
||||||
|
E013 -
|
||||||
|
E014 -
|
||||||
|
E006 -
|
||||||
|
F002 -
|
||||||
|
F014 +
|
||||||
|
F015 -
|
||||||
|
F016 -
|
||||||
|
F001 -
|
||||||
|
F003 +
|
||||||
|
F004 +
|
||||||
|
F005 +
|
||||||
|
F007 -
|
||||||
|
F008 -
|
||||||
|
F009 -
|
||||||
|
F006 -
|
||||||
|
F010 -
|
||||||
|
F011 -
|
||||||
|
F012 -
|
||||||
|
F013 -
|
||||||
|
Y001 +
|
||||||
|
Y002 +
|
||||||
|
Y003 +
|
||||||
|
Y004 +
|
||||||
|
Y005 +
|
||||||
|
Y006 +
|
||||||
|
Y007 +
|
||||||
|
C012 +
|
||||||
|
C002 +
|
||||||
|
C013 +
|
||||||
|
C007 +
|
||||||
|
C008 +
|
||||||
|
C009 +
|
||||||
|
C010 +
|
||||||
|
C011 +
|
||||||
|
C014 +
|
||||||
|
L001 +
|
||||||
|
L003 +
|
||||||
|
L004 -
|
||||||
|
L005 -
|
||||||
|
U001 +
|
||||||
|
U004 +
|
||||||
|
U005 +
|
||||||
|
U006 -
|
||||||
|
U007 +
|
||||||
|
W001 +
|
||||||
|
W011 +
|
||||||
|
W004 -
|
||||||
|
W005 -
|
||||||
|
W010 -
|
||||||
|
W009 -
|
||||||
|
P017 +
|
||||||
|
W006 -
|
||||||
|
W008 -
|
||||||
|
M006 +
|
||||||
|
M011 -
|
||||||
|
M010 +
|
||||||
|
O003 -
|
||||||
|
O001 -
|
||||||
|
S012 -
|
||||||
|
S013 -
|
||||||
|
S014 -
|
||||||
|
K001 +
|
||||||
|
K002 +
|
||||||
|
K005 +
|
||||||
|
M022 +
|
||||||
|
M001 +
|
||||||
|
M004 +
|
||||||
|
M005 +
|
||||||
|
M003 -
|
||||||
|
M012 -
|
||||||
|
M013 -
|
||||||
|
M014 -
|
||||||
|
M015 +
|
||||||
|
M016 -
|
||||||
|
M017 +
|
||||||
|
M018 +
|
||||||
|
M019 -
|
||||||
|
M020 +
|
||||||
|
M021 -
|
||||||
|
N001 -
|
||||||
|
|
115
pester/runspace.Tests.ps1
Normal file
115
pester/runspace.Tests.ps1
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
#region Configurable Variables
|
||||||
|
|
||||||
|
<#
|
||||||
|
.NOTES
|
||||||
|
Use this section to configure testing variables. IE if the number of tabs change in the GUI update that variable here.
|
||||||
|
All variables need to be global to be passed between contexts
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
$global:FormName = "Chris Titus Tech's Windows Utility"
|
||||||
|
|
||||||
|
#endregion Configurable Variables
|
||||||
|
|
||||||
|
#region Load Variables needed for testing
|
||||||
|
|
||||||
|
#Config Files
|
||||||
|
$global:importedconfigs = @{}
|
||||||
|
Get-ChildItem .\config | Where-Object {$_.Extension -eq ".json"} | ForEach-Object {
|
||||||
|
$global:importedconfigs[$psitem.BaseName] = Get-Content $psitem.FullName | ConvertFrom-Json
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion Load Variables needed for testing
|
||||||
|
|
||||||
|
#===========================================================================
|
||||||
|
# Tests - Application Installs
|
||||||
|
#===========================================================================
|
||||||
|
|
||||||
|
Describe "Config Files" -ForEach @(
|
||||||
|
@{
|
||||||
|
name = "applications"
|
||||||
|
config = $('{
|
||||||
|
"winget": "value",
|
||||||
|
"choco": "value"
|
||||||
|
}' | ConvertFrom-Json)
|
||||||
|
},
|
||||||
|
@{
|
||||||
|
name = "tweaks"
|
||||||
|
undo = $true
|
||||||
|
}
|
||||||
|
){
|
||||||
|
Context "$name config file" {
|
||||||
|
It "Imports with no errors" {
|
||||||
|
$global:importedconfigs.$name | should -Not -BeNullOrEmpty
|
||||||
|
}
|
||||||
|
if ($config){
|
||||||
|
It "Imports should be the correct structure" {
|
||||||
|
$applications = $global:importedconfigs.$name | Get-Member -MemberType NoteProperty | Select-Object -ExpandProperty name
|
||||||
|
$template = $config | Get-Member -MemberType NoteProperty | Select-Object -ExpandProperty name
|
||||||
|
$result = New-Object System.Collections.Generic.List[System.Object]
|
||||||
|
Foreach ($application in $applications) {
|
||||||
|
$compare = $global:importedconfigs.$name.$application | Get-Member -MemberType NoteProperty | Select-Object -ExpandProperty name
|
||||||
|
if ($(Compare-Object $compare $template) -ne $null){
|
||||||
|
$result.Add($application)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result | Select-String "WPF*" | should -BeNullOrEmpty
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($undo){
|
||||||
|
It "Tweaks should contain original Value" {
|
||||||
|
$tweaks = $global:importedconfigs.$name | Get-Member -MemberType NoteProperty | Select-Object -ExpandProperty name
|
||||||
|
$result = New-Object System.Collections.Generic.List[System.Object]
|
||||||
|
|
||||||
|
foreach ($tweak in $tweaks){
|
||||||
|
$Originals = @(
|
||||||
|
@{
|
||||||
|
name = "registry"
|
||||||
|
value = "OriginalValue"
|
||||||
|
},
|
||||||
|
@{
|
||||||
|
name = "service"
|
||||||
|
value = "OriginalType"
|
||||||
|
},
|
||||||
|
@{
|
||||||
|
name = "ScheduledTask"
|
||||||
|
value = "OriginalState"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
Foreach ($original in $Originals){
|
||||||
|
$TotalCount = ($global:importedconfigs.$name.$tweak.$($original.name)).count
|
||||||
|
$OriginalCount = ($global:importedconfigs.$name.$tweak.$($original.name).$($original.value) | Where-Object {$_}).count
|
||||||
|
if($TotalCount -ne $OriginalCount){
|
||||||
|
$result.Add("$Tweak,$($original.name)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$result | Select-String "WPF*" | should -BeNullOrEmpty
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#===========================================================================
|
||||||
|
# Tests - Functions
|
||||||
|
#===========================================================================
|
||||||
|
|
||||||
|
Describe "Functions" -ForEach @(Get-ChildItem .\functions -Recurse -File){
|
||||||
|
|
||||||
|
BeforeEach -Scriptblock {
|
||||||
|
. $psitem.FullName
|
||||||
|
}
|
||||||
|
|
||||||
|
Context "$($psitem.BaseName)" {
|
||||||
|
It "Imports with no errors" {
|
||||||
|
Get-ChildItem function:\$($psitem.BaseName) | should -Not -BeNullOrEmpty
|
||||||
|
}
|
||||||
|
It "Contains Description" {
|
||||||
|
get-help $($psitem.BaseName) -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Description | should -Not -BeNullOrEmpty
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -17,7 +17,8 @@
|
|||||||
$global:configs = @{}
|
$global:configs = @{}
|
||||||
|
|
||||||
(
|
(
|
||||||
"applications"
|
"applications",
|
||||||
|
"preset"
|
||||||
) | ForEach-Object {
|
) | ForEach-Object {
|
||||||
$global:configs["$PSItem"] = Get-Content .\config\$PSItem.json | ConvertFrom-Json
|
$global:configs["$PSItem"] = Get-Content .\config\$PSItem.json | ConvertFrom-Json
|
||||||
}
|
}
|
||||||
@ -33,7 +34,7 @@
|
|||||||
|
|
||||||
#dotsource original script to pull in all variables and ensure no errors
|
#dotsource original script to pull in all variables and ensure no errors
|
||||||
$script = Get-Content .\winutil.ps1
|
$script = Get-Content .\winutil.ps1
|
||||||
$output = $script[0..($script.count - 4)] | Out-File .\pester.ps1
|
$output = $script[0..($script.count - 14)] | Out-File .\pester.ps1
|
||||||
|
|
||||||
|
|
||||||
#endregion Load Variables needed for testing
|
#endregion Load Variables needed for testing
|
||||||
@ -49,11 +50,11 @@ Describe "Application Installs" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Context "Winget Install" {
|
Context "Winget Install" {
|
||||||
$global:configs.applications.install | Get-Member -MemberType NoteProperty | ForEach-Object {
|
$global:configs.applications | Get-Member -MemberType NoteProperty | ForEach-Object {
|
||||||
$TestCase = @{ name = $psitem.name }
|
$TestCase = @{ name = $psitem.name }
|
||||||
It "$($psitem.name) should include Winget Install" -TestCases $TestCase{
|
It "$($psitem.name) should include Winget Install" -TestCases $TestCase{
|
||||||
param($name)
|
param($name)
|
||||||
$null -eq $global:configs.applications.install.$name.winget | should -Befalse -because "$name Did not include a Winget Install"
|
$null -eq $global:configs.applications.$name.winget | should -Befalse -because "$name Did not include a Winget Install"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -63,7 +64,7 @@ Describe "Application Installs" {
|
|||||||
$TestCase = @{ name = $psitem }
|
$TestCase = @{ name = $psitem }
|
||||||
It "$($psitem) should include application.json " -TestCases $TestCase{
|
It "$($psitem) should include application.json " -TestCases $TestCase{
|
||||||
param($name)
|
param($name)
|
||||||
$null -eq $global:configs.applications.install.$name | should -Befalse -because "$name Does not have entry in applications.json"
|
$null -eq $global:configs.applications.$name | should -Befalse -because "$name Does not have entry in applications.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -105,12 +106,49 @@ Describe "GUI" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#===========================================================================
|
||||||
|
# Tests - Functions
|
||||||
|
#===========================================================================
|
||||||
|
|
||||||
|
Describe "Functions" {
|
||||||
|
BeforeEach -Scriptblock {
|
||||||
|
. ./pester.ps1
|
||||||
|
$x = 0
|
||||||
|
while($sync.ConfigLoaded -ne $True -or $x -eq 100){
|
||||||
|
start-sleep -Milliseconds 100
|
||||||
|
$x ++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
It "Get-InstallerProcess should return the correct values" {
|
||||||
|
Get-InstallerProcess | should -Befalse
|
||||||
|
$process = Start-Process powershell.exe -ArgumentList "-c start-sleep 5" -PassThru
|
||||||
|
Get-InstallerProcess $process | should -Not -Befalse
|
||||||
|
}
|
||||||
|
|
||||||
|
It "Runspace background load should have data" {
|
||||||
|
$sync.configs.applications | should -Not -BeNullOrEmpty
|
||||||
|
$sync.configs.tweaks | should -Not -BeNullOrEmpty
|
||||||
|
$sync.configs.preset | should -Not -BeNullOrEmpty
|
||||||
|
$sync.configs.feature | should -Not -BeNullOrEmpty
|
||||||
|
$sync.ComputerInfo | should -Not -BeNullOrEmpty
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
# Tests - GUI Functions
|
# Tests - GUI Functions
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
|
|
||||||
Describe "GUI Functions" {
|
Describe "GUI Functions" {
|
||||||
BeforeEach -Scriptblock {. ./pester.ps1}
|
BeforeEach -Scriptblock {
|
||||||
|
. ./pester.ps1
|
||||||
|
$x = 0
|
||||||
|
while($sync.ConfigLoaded -ne $True -or $x -eq 100){
|
||||||
|
start-sleep -Milliseconds 100
|
||||||
|
$x ++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
It "GUI should load with no errors" {
|
It "GUI should load with no errors" {
|
||||||
$WPFTab1BT | should -Not -BeNullOrEmpty
|
$WPFTab1BT | should -Not -BeNullOrEmpty
|
||||||
@ -123,8 +161,6 @@ Describe "GUI Functions" {
|
|||||||
$WPFUpdatessecurity | should -Not -BeNullOrEmpty
|
$WPFUpdatessecurity | should -Not -BeNullOrEmpty
|
||||||
$WPFFeatureInstall | should -Not -BeNullOrEmpty
|
$WPFFeatureInstall | should -Not -BeNullOrEmpty
|
||||||
$WPFundoall | should -Not -BeNullOrEmpty
|
$WPFundoall | should -Not -BeNullOrEmpty
|
||||||
$WPFDisableDarkMode | should -Not -BeNullOrEmpty
|
|
||||||
$WPFEnableDarkMode | should -Not -BeNullOrEmpty
|
|
||||||
$WPFtweaksbutton | should -Not -BeNullOrEmpty
|
$WPFtweaksbutton | should -Not -BeNullOrEmpty
|
||||||
$WPFminimal | should -Not -BeNullOrEmpty
|
$WPFminimal | should -Not -BeNullOrEmpty
|
||||||
$WPFlaptop | should -Not -BeNullOrEmpty
|
$WPFlaptop | should -Not -BeNullOrEmpty
|
||||||
@ -135,7 +171,6 @@ Describe "GUI Functions" {
|
|||||||
|
|
||||||
Context "Get-CheckBoxes" {
|
Context "Get-CheckBoxes" {
|
||||||
It "Get-CheckBoxes Install should return data" {
|
It "Get-CheckBoxes Install should return data" {
|
||||||
. .\pester.ps1
|
|
||||||
|
|
||||||
$TestCheckBoxes = @(
|
$TestCheckBoxes = @(
|
||||||
"WPFInstallvc2015_32"
|
"WPFInstallvc2015_32"
|
||||||
@ -146,7 +181,7 @@ Describe "GUI Functions" {
|
|||||||
$OutputResult = New-Object System.Collections.Generic.List[System.Object]
|
$OutputResult = New-Object System.Collections.Generic.List[System.Object]
|
||||||
$TestCheckBoxes | ForEach-Object {
|
$TestCheckBoxes | ForEach-Object {
|
||||||
|
|
||||||
$global:configs.applications.Install.$psitem.winget -split ";" | ForEach-Object {
|
$global:configs.applications.$psitem.winget -split ";" | ForEach-Object {
|
||||||
$OutputResult.Add($psitem)
|
$OutputResult.Add($psitem)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -154,12 +189,12 @@ Describe "GUI Functions" {
|
|||||||
|
|
||||||
$TestCheckBoxes | ForEach-Object {(Get-Variable $PSItem).value.ischecked = $true}
|
$TestCheckBoxes | ForEach-Object {(Get-Variable $PSItem).value.ischecked = $true}
|
||||||
$Output = Get-CheckBoxes -Group WPFInstall | Sort-Object
|
$Output = Get-CheckBoxes -Group WPFInstall | Sort-Object
|
||||||
$Output | should -Not -BeNullOrEmpty -Because "Output did not containe applications to install"
|
$Output | should -Not -BeNullOrEmpty -Because "Output did not contain applications to install"
|
||||||
$Output | Should -Not -Be $OutputResult -Because "Output contains duplicate values"
|
$Output | Should -Not -Be $OutputResult -Because "Output contains duplicate values"
|
||||||
$Output | Should -Be $($OutputResult | Select-Object -Unique | Sort-Object) -Because "Output doesn't match"
|
$Output | Should -Be $($OutputResult | Select-Object -Unique | Sort-Object) -Because "Output doesn't match"
|
||||||
$TestCheckBoxes | ForEach-Object {(Get-Variable $PSItem).value.ischecked | should -be $false}
|
$TestCheckBoxes | ForEach-Object {(Get-Variable $PSItem).value.ischecked | should -be $false}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Context "Set-Presets" {
|
Context "Set-Presets" {
|
||||||
$global:configs.preset | Get-Member -MemberType NoteProperty | ForEach-Object {
|
$global:configs.preset | Get-Member -MemberType NoteProperty | ForEach-Object {
|
||||||
$TestCase = @{ name = $psitem.name }
|
$TestCase = @{ name = $psitem.name }
|
||||||
|
1529
runspace.ps1
1529
runspace.ps1
File diff suppressed because it is too large
Load Diff
87
scripts/main.ps1
Normal file
87
scripts/main.ps1
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
#region exception classes
|
||||||
|
|
||||||
|
class WingetFailedInstall : Exception {
|
||||||
|
[string] $additionalData
|
||||||
|
|
||||||
|
WingetFailedInstall($Message) : base($Message) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ChocoFailedInstall : Exception {
|
||||||
|
[string] $additionalData
|
||||||
|
|
||||||
|
ChocoFailedInstall($Message) : base($Message) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
class GenericException : Exception {
|
||||||
|
[string] $additionalData
|
||||||
|
|
||||||
|
GenericException($Message) : base($Message) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion exception classes
|
||||||
|
|
||||||
|
$inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window'
|
||||||
|
[void][System.Reflection.Assembly]::LoadWithPartialName('presentationframework')
|
||||||
|
[xml]$XAML = $inputXML
|
||||||
|
#Read XAML
|
||||||
|
|
||||||
|
$reader = (New-Object System.Xml.XmlNodeReader $xaml)
|
||||||
|
try { $Form = [Windows.Markup.XamlReader]::Load( $reader ) }
|
||||||
|
catch [System.Management.Automation.MethodInvocationException] {
|
||||||
|
Write-Warning "We ran into a problem with the XAML code. Check the syntax for this control..."
|
||||||
|
Write-Host $error[0].Exception.Message -ForegroundColor Red
|
||||||
|
If ($error[0].Exception.Message -like "*button*") {
|
||||||
|
write-warning "Ensure your <button in the `$inputXML does NOT have a Click=ButtonClick property. PS can't handle this`n`n`n`n"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
# If it broke some other way <img draggable="false" role="img" class="emoji" alt="😀" src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/svg/1f600.svg">
|
||||||
|
Write-Host "Unable to load Windows.Markup.XamlReader. Double-check syntax and ensure .net is installed."
|
||||||
|
}
|
||||||
|
|
||||||
|
#===========================================================================
|
||||||
|
# Store Form Objects In PowerShell
|
||||||
|
#===========================================================================
|
||||||
|
|
||||||
|
$xaml.SelectNodes("//*[@Name]") | ForEach-Object { Set-Variable -Name "WPF$($_.Name)" -Value $Form.FindName($_.Name) }
|
||||||
|
|
||||||
|
$buttons = get-variable | Where-Object {$psitem.name -like "WPF*" -and $psitem.value -ne $null -and $psitem.value.GetType().name -eq "Button"}
|
||||||
|
foreach ($button in $buttons){
|
||||||
|
$button.value.Add_Click({
|
||||||
|
[System.Object]$Sender = $args[0]
|
||||||
|
Invoke-WPFButton "WPF$($Sender.name)"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$WPFToggleDarkMode.IsChecked = Get-WinUtilDarkMode
|
||||||
|
|
||||||
|
#===========================================================================
|
||||||
|
# Setup background config
|
||||||
|
#===========================================================================
|
||||||
|
|
||||||
|
#Load information in the background
|
||||||
|
Invoke-WPFRunspace -ScriptBlock {
|
||||||
|
$sync.ConfigLoaded = $False
|
||||||
|
|
||||||
|
$sync.ComputerInfo = Get-ComputerInfo
|
||||||
|
|
||||||
|
$sync.ConfigLoaded = $True
|
||||||
|
} | Out-Null
|
||||||
|
|
||||||
|
#===========================================================================
|
||||||
|
# Shows the form
|
||||||
|
#===========================================================================
|
||||||
|
|
||||||
|
Invoke-WPFFormVariables
|
||||||
|
|
||||||
|
try{
|
||||||
|
Install-WinUtilChoco
|
||||||
|
}
|
||||||
|
Catch [ChocoFailedInstall]{
|
||||||
|
Write-Host "==========================================="
|
||||||
|
Write-Host "-- Chocolatey failed to install ---"
|
||||||
|
Write-Host "==========================================="
|
||||||
|
}
|
||||||
|
$form.title = $form.title + " " + $sync.version
|
||||||
|
$Form.ShowDialog() | out-null
|
||||||
|
Stop-Transcript
|
19
scripts/start.ps1
Normal file
19
scripts/start.ps1
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<#
|
||||||
|
.NOTES
|
||||||
|
Author : Chris Titus @christitustech
|
||||||
|
Runspace Author: @DeveloperDurp
|
||||||
|
GitHub : https://github.com/ChrisTitusTech
|
||||||
|
Version : #{replaceme}
|
||||||
|
#>
|
||||||
|
|
||||||
|
Start-Transcript $ENV:TEMP\Winutil.log -Append
|
||||||
|
|
||||||
|
#Load DLLs
|
||||||
|
Add-Type -AssemblyName System.Windows.Forms
|
||||||
|
|
||||||
|
# variable to sync between runspaces
|
||||||
|
$sync = [Hashtable]::Synchronized(@{})
|
||||||
|
$sync.PSScriptRoot = $PSScriptRoot
|
||||||
|
$sync.version = "#{replaceme}"
|
||||||
|
$sync.configs = @{}
|
||||||
|
$sync.ProcessRunning = $false
|
4777
winutil.ps1
4777
winutil.ps1
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
<Window x:Class="WinUtility.MainWindow"
|
<Window x:Class="WinUtility.MainWindow"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
@ -148,6 +148,7 @@
|
|||||||
<CheckBox Name="Installnodejslts" Content="NodeJS LTS" Margin="5,0"/>
|
<CheckBox Name="Installnodejslts" Content="NodeJS LTS" Margin="5,0"/>
|
||||||
<CheckBox Name="Installpython3" Content="Python3" Margin="5,0"/>
|
<CheckBox Name="Installpython3" Content="Python3" Margin="5,0"/>
|
||||||
<CheckBox Name="Installrustlang" Content="Rust" Margin="5,0"/>
|
<CheckBox Name="Installrustlang" Content="Rust" Margin="5,0"/>
|
||||||
|
<CheckBox Name="Installgolang" Content="GoLang" Margin="5,0"/>
|
||||||
<CheckBox Name="Installsublime" Content="Sublime" Margin="5,0"/>
|
<CheckBox Name="Installsublime" Content="Sublime" Margin="5,0"/>
|
||||||
<CheckBox Name="Installunity" Content="Unity Game Engine" Margin="5,0"/>
|
<CheckBox Name="Installunity" Content="Unity Game Engine" Margin="5,0"/>
|
||||||
<CheckBox Name="Installvisualstudio" Content="Visual Studio 2022" Margin="5,0"/>
|
<CheckBox Name="Installvisualstudio" Content="Visual Studio 2022" Margin="5,0"/>
|
||||||
@ -273,22 +274,28 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height=".10*"/>
|
<RowDefinition Height=".10*"/>
|
||||||
|
<RowDefinition Height=".70*"/>
|
||||||
<RowDefinition Height=".10*"/>
|
<RowDefinition Height=".10*"/>
|
||||||
<RowDefinition Height=".80*"/>
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Background="#777777" Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Center" Grid.ColumnSpan="2" Margin="10">
|
<StackPanel Background="#777777" Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Center" Grid.Column="0" Margin="10">
|
||||||
<Label Content="Recommended Selections:" FontSize="17" VerticalAlignment="Center"/>
|
<Label Content="Recommended Selections:" FontSize="17" VerticalAlignment="Center"/>
|
||||||
<Button Name="desktop" Content="Desktop" Margin="7"/>
|
<Button Name="desktop" Content=" Desktop " Margin="7"/>
|
||||||
<Button Name="laptop" Content="Laptop" Margin="7"/>
|
<Button Name="laptop" Content=" Laptop " Margin="7"/>
|
||||||
<Button Name="minimal" Content="Minimal" Margin="7"/>
|
<Button Name="minimal" Content=" Minimal " Margin="7"/>
|
||||||
|
<Button Name="clear" Content=" Clear " Margin="7"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Background="#777777" Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center" Grid.ColumnSpan="2" Margin="10">
|
<StackPanel Background="#777777" Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Center" Grid.Column="1" Margin="10">
|
||||||
|
<Label Content="Configuration File:" FontSize="17" VerticalAlignment="Center"/>
|
||||||
|
<Button Name="import" Content=" Import " Margin="7"/>
|
||||||
|
<Button Name="export" Content=" Export " Margin="7"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Background="#777777" Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center" Grid.ColumnSpan="2" Margin="10">
|
||||||
<TextBlock Padding="10">
|
<TextBlock Padding="10">
|
||||||
Note: Hover over items to get a better description. Please be careful as many of these tweaks will heavily modify your system.
|
Note: Hover over items to get a better description. Please be careful as many of these tweaks will heavily modify your system.
|
||||||
<LineBreak/>Recommended selections are for normal users and if you are unsure do NOT check anything else!
|
<LineBreak/>Recommended selections are for normal users and if you are unsure do NOT check anything else!
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Row="2" Grid.Column="0" Margin="10,5">
|
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Row="1" Grid.Column="0" Margin="10,5">
|
||||||
<Label FontSize="16" Content="Essential Tweaks"/>
|
<Label FontSize="16" Content="Essential Tweaks"/>
|
||||||
<CheckBox Name="EssTweaksRP" Content="Create Restore Point" Margin="5,0" ToolTip="Creates a Windows Restore point before modifying system. Can use Windows System Restore to rollback to before tweaks were applied"/>
|
<CheckBox Name="EssTweaksRP" Content="Create Restore Point" Margin="5,0" ToolTip="Creates a Windows Restore point before modifying system. Can use Windows System Restore to rollback to before tweaks were applied"/>
|
||||||
<CheckBox Name="EssTweaksOO" Content="Run OO Shutup" Margin="5,0" ToolTip="Runs OO Shutup from https://www.oo-software.com/en/shutup10"/>
|
<CheckBox Name="EssTweaksOO" Content="Run OO Shutup" Margin="5,0" ToolTip="Runs OO Shutup from https://www.oo-software.com/en/shutup10"/>
|
||||||
@ -314,7 +321,7 @@
|
|||||||
<Button Name="RemoveUltPerf" Background="AliceBlue" Content="Remove Ultimate Performance Profile" HorizontalAlignment = "Left" Margin="5,0,0,5" Padding="20,5" Width="300"/>
|
<Button Name="RemoveUltPerf" Background="AliceBlue" Content="Remove Ultimate Performance Profile" HorizontalAlignment = "Left" Margin="5,0,0,5" Padding="20,5" Width="300"/>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Row="2" Grid.Column="1" Margin="10,5">
|
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Row="1" Grid.Column="1" Margin="10,5">
|
||||||
<Label FontSize="16" Content="Misc. Tweaks"/>
|
<Label FontSize="16" Content="Misc. Tweaks"/>
|
||||||
<CheckBox Name="MiscTweaksPower" Content="Disable Power Throttling" Margin="5,0" ToolTip="This is mainly for Laptops, It disables Power Throttling and will use more battery."/>
|
<CheckBox Name="MiscTweaksPower" Content="Disable Power Throttling" Margin="5,0" ToolTip="This is mainly for Laptops, It disables Power Throttling and will use more battery."/>
|
||||||
<CheckBox Name="MiscTweaksLapPower" Content="Enable Power Throttling" Margin="5,0" ToolTip="ONLY FOR LAPTOPS! Do not use on a desktop."/>
|
<CheckBox Name="MiscTweaksLapPower" Content="Enable Power Throttling" Margin="5,0" ToolTip="ONLY FOR LAPTOPS! Do not use on a desktop."/>
|
||||||
@ -330,13 +337,19 @@
|
|||||||
<CheckBox Name="EssTweaksRemoveCortana" Content="Remove Cortana" Margin="5,0" ToolTip="Removes Cortana, but often breaks search... if you are a heavy windows search users, this is NOT recommended."/>
|
<CheckBox Name="EssTweaksRemoveCortana" Content="Remove Cortana" Margin="5,0" ToolTip="Removes Cortana, but often breaks search... if you are a heavy windows search users, this is NOT recommended."/>
|
||||||
<CheckBox Name="EssTweaksRemoveEdge" Content="Remove Microsoft Edge" Margin="5,0" ToolTip="Removes MS Edge when it gets reinstalled by updates."/>
|
<CheckBox Name="EssTweaksRemoveEdge" Content="Remove Microsoft Edge" Margin="5,0" ToolTip="Removes MS Edge when it gets reinstalled by updates."/>
|
||||||
<CheckBox Name="MiscTweaksRightClickMenu" Content="Set Classic Right-Click Menu " Margin="5,0" ToolTip="Great Windows 11 tweak to bring back good context menus when right clicking things in explorer."/>
|
<CheckBox Name="MiscTweaksRightClickMenu" Content="Set Classic Right-Click Menu " Margin="5,0" ToolTip="Great Windows 11 tweak to bring back good context menus when right clicking things in explorer."/>
|
||||||
|
<CheckBox Name="MiscTweaksDisableMouseAcceleration" Content="Disable Mouse Acceleration" Margin="5,0" ToolTip="Disables Mouse Acceleration."/>
|
||||||
|
<CheckBox Name="MiscTweaksEnableMouseAcceleration" Content="Enable Mouse Acceleration" Margin="5,0" ToolTip="Enables Mouse Acceleration."/>
|
||||||
<Label Content="DNS" />
|
<Label Content="DNS" />
|
||||||
<ComboBox Name="changedns" Height = "20" Width = "150" HorizontalAlignment = "Left" Margin="5,5">
|
<ComboBox Name="changedns" Height = "20" Width = "150" HorizontalAlignment = "Left" Margin="5,5">
|
||||||
<ComboBoxItem IsSelected="True" Content = "Default"/>
|
<ComboBoxItem IsSelected="True" Content = "Default"/>
|
||||||
|
<ComboBoxItem Content = "DHCP"/>
|
||||||
<ComboBoxItem Content = "Google"/>
|
<ComboBoxItem Content = "Google"/>
|
||||||
<ComboBoxItem Content = "Cloud Flare"/>
|
<ComboBoxItem Content = "Cloudflare"/>
|
||||||
|
<ComboBoxItem Content = "Cloudflare_Malware"/>
|
||||||
|
<ComboBoxItem Content = "Cloudflare_Malware_Adult"/>
|
||||||
<ComboBoxItem Content = "Level3"/>
|
<ComboBoxItem Content = "Level3"/>
|
||||||
<ComboBoxItem Content = "Open DNS"/>
|
<ComboBoxItem Content = "Open_DNS"/>
|
||||||
|
<ComboBoxItem Content = "Quad9"/>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<Button Name="tweaksbutton" Background="AliceBlue" Content="Run Tweaks " HorizontalAlignment = "Left" Margin="5,0" Padding="20,5" Width="150"/>
|
<Button Name="tweaksbutton" Background="AliceBlue" Content="Run Tweaks " HorizontalAlignment = "Left" Margin="5,0" Padding="20,5" Width="150"/>
|
||||||
<Button Name="undoall" Background="AliceBlue" Content="Undo Tweaks" HorizontalAlignment = "Left" Margin="5,0" Padding="20,5" Width="150"/>
|
<Button Name="undoall" Background="AliceBlue" Content="Undo Tweaks" HorizontalAlignment = "Left" Margin="5,0" Padding="20,5" Width="150"/>
|
Loading…
Reference in New Issue
Block a user