mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-22 05:51:30 -06:00
Test 2022 (#240)
* Merge Gaming Tweaks and Temp Files Addition (#193) * Update README.md * QOL Terminal - Win Update Revamp * Fix Flickering * Quick Fix - UAC Property error * Network Performance Tweak * Gaming Tweaks * Delete Temp Files Addition * Delete Temp Files GUI * Added LibreOffice to applications.json and winutil.ps1 to fix #171 (#178) * Fixes missing LibreOffice (#171) Added missing LibreOffice to fix issue #171. * Fixes missing LibreOffice (#171) Added LibreOffice to winutil.ps1 to fix issue #171. * Create `FUNDING.yml` (#182) * Longer Thing (#186) * redid the whole thing * man * Tweaks to change I like most of these but adding the UAC back in, Disabling Long Paths, and removing TPM properties aren't approved in the default essential tweaks. This should have been put into the Undo all portion Co-authored-by: Chris Titus <dfm.titus@gmail.com> * Move winget install to user temp folder (#192) * Move winget install to user temp folder * Fix path variable Co-authored-by: Chris Titus <dfm.titus@gmail.com> * Disable UAC Commit * Disk Cleanup Addition * added check for checking if path exists for TPM (#195) * Disable Gamebar Presence Writer (#202) * Fixed GameDVR Code Registry values were not changing after applying GameDVR tweaks. Because all the registry tweaks were under if condition in the code. Modified that and now working properly. * Diable Gamebar Presence Writer Gamebar Presence Writer causes stutter in games, while running in background. Deactivated the trigger of Gamebar Presence Writer to resolve this. * Added Simplewall for Install Requested Feature ChrisTitusTech#56 (#205) * Added KDENLive Video Editor for Install Requested Feature #38 (#206) * Added WizTree for Install Requested Feature #42 (#207) * Added Viber for Install Requested Feature ChrisTitusTech/winutil#102 (#208) * Added Tor Browser for Install (#209) * Added Internet Download Manager for Install (#210) * Added Glary Utilities for install (#214) * Added option to Disable Notifications and Action Center (#220) * added option for set classic right click menu (#223) * Create Edge_Removal.bat * Added option for remove microsoft edge (#224) * Added option for remove microsoft edge * Update winutil.ps1 Co-authored-by: Chris Titus <dfm.titus@gmail.com> * Added Dark Mode (#225) * Added option to remove cortana (#226) Co-authored-by: Chris Titus <dfm.titus@gmail.com> * Putting it all in the same console window * fix missing bracket Co-authored-by: hoffmanra <33332650+hoffmanra@users.noreply.github.com> Co-authored-by: Robin Avery <robin@ribbanya.dev> Co-authored-by: Sarah <45071533+PrincessAkira@users.noreply.github.com> Co-authored-by: DeveloperDurp <developerdurp@durp.info> Co-authored-by: Dipayan Biswas <108147735+d1payan@users.noreply.github.com> Co-authored-by: Padsala Tushal <57517785+padsalatushal@users.noreply.github.com>
This commit is contained in:
parent
eec55eab59
commit
e684d0f9bf
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1 @@
|
||||
custom: https://www.cttstore.com/windows-toolbox
|
155
Edge_Removal.bat
Normal file
155
Edge_Removal.bat
Normal file
@ -0,0 +1,155 @@
|
||||
@(set "0=%~f0"^)#) & powershell -nop -c iex([io.file]::ReadAllText($env:0)) & exit /b
|
||||
#:: double-click to run or just copy-paste into powershell - it's a standalone hybrid script
|
||||
sp 'HKCU:\Volatile Environment' 'Edge_Removal' @'
|
||||
|
||||
$also_remove_webview = 1
|
||||
|
||||
$host.ui.RawUI.WindowTitle = 'Edge Removal '
|
||||
## targets
|
||||
$remove_win32 = @("Microsoft Edge","Microsoft Edge Update"); $remove_appx = @("MicrosoftEdge")
|
||||
if ($also_remove_webview -eq 1) {$remove_win32 += "Microsoft EdgeWebView"; $remove_appx += "Win32WebViewHost"}
|
||||
## enable admin privileges
|
||||
$D1=[uri].module.gettype('System.Diagnostics.Process')."GetM`ethods"(42) |where {$_.Name -eq 'SetPrivilege'} #`:no-ev-warn
|
||||
'SeSecurityPrivilege','SeTakeOwnershipPrivilege','SeBackupPrivilege','SeRestorePrivilege'|foreach {$D1.Invoke($null, @("$_",2))}
|
||||
## set useless policies
|
||||
foreach ($p in 'HKLM\SOFTWARE\Policies','HKLM\SOFTWARE') {
|
||||
cmd /c "reg add ""$p\Microsoft\EdgeUpdate"" /f /v InstallDefault /d 0 /t reg_dword >nul 2>nul"
|
||||
cmd /c "reg add ""$p\Microsoft\EdgeUpdate"" /f /v Install{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062} /d 0 /t reg_dword >nul 2>nul"
|
||||
cmd /c "reg add ""$p\Microsoft\EdgeUpdate"" /f /v Install{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5} /d 1 /t reg_dword >nul 2>nul"
|
||||
cmd /c "reg add ""$p\Microsoft\EdgeUpdate"" /f /v DoNotUpdateToEdgeWithChromium /d 1 /t reg_dword >nul 2>nul"
|
||||
}
|
||||
## clear win32 uninstall block
|
||||
foreach ($hk in 'HKCU','HKLM') {foreach ($wow in '','\Wow6432Node') {foreach ($i in $remove_win32) {
|
||||
cmd /c "reg delete ""$hk\SOFTWARE${wow}\Microsoft\Windows\CurrentVersion\Uninstall\$i"" /f /v NoRemove >nul 2>nul"
|
||||
}}}
|
||||
## find all Edge setup.exe and gather BHO paths
|
||||
$setup = @(); $bho = @(); $bho += "$env:ProgramData\ie_to_edge_stub.exe"; $bho += "$env:Public\ie_to_edge_stub.exe"
|
||||
"LocalApplicationData","ProgramFilesX86","ProgramFiles" |foreach {
|
||||
$setup += dir $($([Environment]::GetFolderPath($_)) + '\Microsoft\Edge*\setup.exe') -rec -ea 0
|
||||
$bho += dir $($([Environment]::GetFolderPath($_)) + '\Microsoft\Edge*\ie_to_edge_stub.exe') -rec -ea 0
|
||||
}
|
||||
## shut edge down
|
||||
foreach ($p in 'MicrosoftEdgeUpdate','chredge','msedge','edge','msedgewebview2','Widgets') { kill -name $p -force -ea 0 }
|
||||
## use dedicated C:\Scripts path due to Sigma rules FUD
|
||||
$DIR = "$env:SystemDrive\Scripts"; $null = mkdir $DIR -ea 0
|
||||
## export OpenWebSearch innovative redirector
|
||||
foreach ($b in $bho) { if (test-path $b) { try {copy $b "$DIR\ie_to_edge_stub.exe" -force -ea 0} catch{} } }
|
||||
## clear appx uninstall block and remove
|
||||
$provisioned = get-appxprovisionedpackage -online; $appxpackage = get-appxpackage -allusers
|
||||
$store = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore'; $store_reg = $store.replace(':','')
|
||||
$users = @('S-1-5-18'); if (test-path $store) {$users += $((dir $store |where {$_ -like '*S-1-5-21*'}).PSChildName)}
|
||||
foreach ($choice in $remove_appx) { if ('' -eq $choice.Trim()) {continue}
|
||||
foreach ($appx in $($provisioned |where {$_.PackageName -like "*$choice*"})) {
|
||||
$PackageFamilyName = ($appxpackage |where {$_.Name -eq $appx.DisplayName}).PackageFamilyName; $PackageFamilyName
|
||||
cmd /c "reg add ""$store_reg\Deprovisioned\$PackageFamilyName"" /f >nul 2>nul"
|
||||
cmd /c "dism /online /remove-provisionedappxpackage /packagename:$($appx.PackageName) >nul 2>nul"
|
||||
#powershell -nop -c remove-appxprovisionedpackage -packagename "'$($appx.PackageName)'" -online 2>&1 >''
|
||||
}
|
||||
foreach ($appx in $($appxpackage |where {$_.PackageFullName -like "*$choice*"})) {
|
||||
$inbox = (gp "$store\InboxApplications\*$($appx.Name)*" Path).PSChildName
|
||||
$PackageFamilyName = $appx.PackageFamilyName; $PackageFullName = $appx.PackageFullName; $PackageFullName
|
||||
foreach ($app in $inbox) {cmd /c "reg delete ""$store_reg\InboxApplications\$app"" /f >nul 2>nul" }
|
||||
cmd /c "reg add ""$store_reg\Deprovisioned\$PackageFamilyName"" /f >nul 2>nul"
|
||||
foreach ($sid in $users) {cmd /c "reg add ""$store_reg\EndOfLife\$sid\$PackageFullName"" /f >nul 2>nul"}
|
||||
cmd /c "dism /online /set-nonremovableapppolicy /packagefamily:$PackageFamilyName /nonremovable:0 >nul 2>nul"
|
||||
powershell -nop -c "remove-appxpackage -package '$PackageFullName' -AllUsers" 2>&1 >''
|
||||
foreach ($sid in $users) {cmd /c "reg delete ""$store_reg\EndOfLife\$sid\$PackageFullName"" /f >nul 2>nul"}
|
||||
}
|
||||
}
|
||||
## shut edge down, again
|
||||
foreach ($p in 'MicrosoftEdgeUpdate','chredge','msedge','edge','msedgewebview2','Widgets') { kill -name $p -force -ea 0 }
|
||||
## brute-run found Edge setup.exe with uninstall args
|
||||
$purge = '--uninstall --system-level --force-uninstall'
|
||||
if ($also_remove_webview -eq 1) { foreach ($s in $setup) { try{ start -wait $s -args "--msedgewebview $purge" } catch{} } }
|
||||
foreach ($s in $setup) { try{ start -wait $s -args "--msedge $purge" } catch{} }
|
||||
## prevent latest cumulative update (LCU) failing due to non-matching EndOfLife Edge entries
|
||||
foreach ($i in $remove_appx) {
|
||||
dir "$store\EndOfLife" -rec -ea 0 |where {$_ -like "*${i}*"} |foreach {cmd /c "reg delete ""$($_.Name)"" /f >nul 2>nul"}
|
||||
dir "$store\Deleted\EndOfLife" -rec -ea 0 |where {$_ -like "*${i}*"} |foreach {cmd /c "reg delete ""$($_.Name)"" /f >nul 2>nul"}
|
||||
}
|
||||
## extra cleanup
|
||||
$desktop = $([Environment]::GetFolderPath('Desktop')); $appdata = $([Environment]::GetFolderPath('ApplicationData'))
|
||||
del "$appdata\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Tombstones\Microsoft Edge.lnk" -force -ea 0
|
||||
del "$appdata\Microsoft\Internet Explorer\Quick Launch\Microsoft Edge.lnk" -force -ea 0
|
||||
del "$desktop\Microsoft Edge.lnk" -force -ea 0
|
||||
|
||||
## add OpenWebSearch to redirect microsoft-edge: anti-competitive links to the default browser
|
||||
$IFEO = 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options'
|
||||
$MSEP = ($env:ProgramFiles,${env:ProgramFiles(x86)})[[Environment]::Is64BitOperatingSystem] + '\Microsoft\Edge\Application'
|
||||
$MIN = ('--headless','--width 1 --height 1')[([environment]::OSVersion.Version.Build) -gt 25179]
|
||||
$CMD = "$env:systemroot\system32\conhost.exe $MIN" # AveYo: minimize prompt - see Terminal issue #13914
|
||||
cmd /c "reg add HKCR\microsoft-edge /f /ve /d URL:microsoft-edge >nul"
|
||||
cmd /c "reg add HKCR\microsoft-edge /f /v ""URL Protocol"" /d """" >nul"
|
||||
cmd /c "reg add HKCR\microsoft-edge /f /v NoOpenWith /d """" >nul"
|
||||
cmd /c "reg add HKCR\microsoft-edge\shell\open\command /f /ve /d ""$DIR\ie_to_edge_stub.exe %1"" >nul"
|
||||
cmd /c "reg add HKCR\MSEdgeHTM /f /v NoOpenWith /d """" >nul"
|
||||
cmd /c "reg add HKCR\MSEdgeHTM\shell\open\command /f /ve /d ""$DIR\ie_to_edge_stub.exe %1"" >nul"
|
||||
cmd /c "reg add ""$IFEO\ie_to_edge_stub.exe"" /f /v UseFilter /d 1 /t reg_dword >nul >nul"
|
||||
cmd /c "reg add ""$IFEO\ie_to_edge_stub.exe\0"" /f /v FilterFullPath /d ""$DIR\ie_to_edge_stub.exe"" >nul"
|
||||
cmd /c "reg add ""$IFEO\ie_to_edge_stub.exe\0"" /f /v Debugger /d ""$CMD $DIR\OpenWebSearch.cmd"" >nul"
|
||||
cmd /c "reg add ""$IFEO\msedge.exe"" /f /v UseFilter /d 1 /t reg_dword >nul"
|
||||
cmd /c "reg add ""$IFEO\msedge.exe\0"" /f /v FilterFullPath /d ""$MSEP\msedge.exe"" >nul"
|
||||
cmd /c "reg add ""$IFEO\msedge.exe\0"" /f /v Debugger /d ""$CMD $DIR\OpenWebSearch.cmd"" >nul"
|
||||
|
||||
$OpenWebSearch = @$
|
||||
@title OpenWebSearch Redux & echo off & set ?= open start menu web search, widgets links or help in your chosen browser
|
||||
for /f %%E in ('"prompt $E$S& for %%e in (1) do rem"') do echo;%%E[2t 2>nul & rem AveYo: minimize prompt
|
||||
call :reg_var "HKCU\SOFTWARE\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice" ProgID ProgID
|
||||
if /i "%ProgID%" equ "MSEdgeHTM" echo;Default browser is set to Edge! Change it or remove OpenWebSearch script. & pause & exit /b
|
||||
call :reg_var "HKCR\%ProgID%\shell\open\command" "" Browser
|
||||
set Choice=& for %%. in (%Browser%) do if not defined Choice set "Choice=%%~."
|
||||
call :reg_var "HKCR\MSEdgeMHT\shell\open\command" "" FallBack
|
||||
set "Edge=" & for %%. in (%FallBack%) do if not defined Edge set "Edge=%%~."
|
||||
set "URI=" & set "URL=" & set "NOOP=" & set "PassTrough=%Edge:msedge=edge%"
|
||||
set "CLI=%CMDCMDLINE:"=``% "
|
||||
if defined CLI set "CLI=%CLI:*ie_to_edge_stub.exe`` =%"
|
||||
if defined CLI set "CLI=%CLI:*ie_to_edge_stub.exe =%"
|
||||
if defined CLI set "CLI=%CLI:*msedge.exe`` =%"
|
||||
if defined CLI set "CLI=%CLI:*msedge.exe =%"
|
||||
set "FIX=%CLI:~-1%"
|
||||
if defined CLI if "%FIX%"==" " set "CLI=%CLI:~0,-1%"
|
||||
if defined CLI set "RED=%CLI:microsoft-edge=%"
|
||||
if defined CLI set "URL=%CLI:http=%"
|
||||
if defined CLI set "ARG=%CLI:``="%"
|
||||
if "%CLI%" equ "%RED%" (set NOOP=1) else if "%CLI%" equ "%URL%" (set NOOP=1)
|
||||
if defined NOOP if exist "%PassTrough%" start "" "%PassTrough%" %ARG%
|
||||
if defined NOOP exit /b
|
||||
set "URL=%CLI:*microsoft-edge=%"
|
||||
set "URL=http%URL:*http=%"
|
||||
set "FIX=%URL:~-2%"
|
||||
if defined URL if "%FIX%"=="``" set "URL=%URL:~0,-2%"
|
||||
call :dec_url
|
||||
start "" "%Choice%" "%URL%"
|
||||
exit
|
||||
|
||||
:reg_var [USAGE] call :reg_var "HKCU\Volatile Environment" value-or-"" variable [extra options]
|
||||
set {var}=& set {reg}=reg query "%~1" /v %2 /z /se "," /f /e& if %2=="" set {reg}=reg query "%~1" /ve /z /se "," /f /e
|
||||
for /f "skip=2 tokens=* delims=" %%V in ('%{reg}% %4 %5 %6 %7 %8 %9 2^>nul') do if not defined {var} set "{var}=%%V"
|
||||
if not defined {var} (set {reg}=& set "%~3="& exit /b) else if %2=="" set "{var}=%{var}:*) =%"& rem AveYo: v3
|
||||
if not defined {var} (set {reg}=& set "%~3="& exit /b) else set {reg}=& set "%~3=%{var}:*) =%"& set {var}=& exit /b
|
||||
|
||||
:dec_url brute url percent decoding
|
||||
set ".=%URL:!=}%"&setlocal enabledelayedexpansion& rem brute url percent decoding
|
||||
set ".=!.:%%={!" &set ".=!.:{3A=:!" &set ".=!.:{2F=/!" &set ".=!.:{3F=?!" &set ".=!.:{23=#!" &set ".=!.:{5B=[!" &set ".=!.:{5D=]!"
|
||||
set ".=!.:{40=@!"&set ".=!.:{21=}!" &set ".=!.:{24=$!" &set ".=!.:{26=&!" &set ".=!.:{27='!" &set ".=!.:{28=(!" &set ".=!.:{29=)!"
|
||||
set ".=!.:{2A=*!"&set ".=!.:{2B=+!" &set ".=!.:{2C=,!" &set ".=!.:{3B=;!" &set ".=!.:{3D==!" &set ".=!.:{25=%%!"&set ".=!.:{20= !"
|
||||
set ".=!.:{=%%!" &rem set ",=!.:%%=!" & if "!,!" neq "!.!" endlocal& set "URL=%.:}=!%" & call :dec_url
|
||||
endlocal& set "URL=%.:}=!%" & exit /b
|
||||
rem done
|
||||
|
||||
$@
|
||||
[io.file]::WriteAllText("$DIR\OpenWebSearch.cmd", $OpenWebSearch) >''
|
||||
## cleanup
|
||||
$cleanup = gp 'Registry::HKEY_Users\S-1-5-21*\Volatile*' Edge_Removal -ea 0
|
||||
if ($cleanup) {rp $cleanup.PSPath Edge_Removal -force -ea 0}
|
||||
|
||||
|
||||
write-host -nonew -fore green -back black "`n EDGE REMOVED!";
|
||||
exit
|
||||
|
||||
## ask to run script as admin
|
||||
'@.replace("$@","'@").replace("@$","@'") -force -ea 0;
|
||||
$A = '-nop -noe -c & {iex((gp ''Registry::HKEY_Users\S-1-5-21*\Volatile*'' Edge_Removal -ea 0)[0].Edge_Removal)}'
|
||||
start powershell -args $A -verb runas
|
||||
$_Press_Enter
|
||||
#::
|
@ -36,6 +36,7 @@
|
||||
<CheckBox Name="Installfirefox" Content="Firefox" Margin="5,0"/>
|
||||
<CheckBox Name="Installlibrewolf" Content="LibreWolf" Margin="5,0"/>
|
||||
<CheckBox Name="Installvivaldi" Content="Vivaldi" Margin="5,0"/>
|
||||
<CheckBox Name="Installtor" Content="Tor Browser" Margin="5,0"/>
|
||||
|
||||
<Label Content="Communications" FontSize="16" Margin="5,0"/>
|
||||
<CheckBox Name="Installdiscord" Content="Discord" Margin="5,0"/>
|
||||
@ -44,6 +45,7 @@
|
||||
<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="Installviber" Content="Viber" Margin="5,0"/>
|
||||
<CheckBox Name="Installteams" Content="Microsoft Teams" Margin="5,0"/>
|
||||
<CheckBox Name="Installzoom" Content="Zoom Video Conference" Margin="5,0"/>
|
||||
|
||||
@ -85,7 +87,8 @@
|
||||
<CheckBox Name="Installputty" Content="Putty" Margin="5,0"/>
|
||||
<CheckBox Name="Installscp" Content="WinSCP" Margin="5,0"/>
|
||||
<CheckBox Name="Installwireshark" Content="WireShark" Margin="5,0"/>
|
||||
|
||||
<CheckBox Name="Installsimplewall" Content="SimpleWall" 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"/>
|
||||
@ -102,6 +105,7 @@
|
||||
<CheckBox Name="Installsharex" Content="ShareX (Screenshots)" Margin="5,0"/>
|
||||
<CheckBox Name="Installspotify" Content="Spotify" Margin="5,0"/>
|
||||
<CheckBox Name="Installvlc" Content="VLC (Video Player)" Margin="5,0"/>
|
||||
<CheckBox Name="Installkdenlive" Content="Kdenlive (Video Editor)" Margin="5,0"/>
|
||||
<CheckBox Name="Installvoicemeeter" Content="Voicemeeter (Audio)" Margin="5,0"/>
|
||||
|
||||
</StackPanel>
|
||||
@ -115,6 +119,7 @@
|
||||
<CheckBox Name="Installetcher" Content="Etcher USB Creator" Margin="5,0"/>
|
||||
<CheckBox Name="Installesearch" Content="Everything Search" 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="Installkeepass" Content="KeePassXC" Margin="5,0"/>
|
||||
<CheckBox Name="Installmalwarebytes" Content="MalwareBytes" Margin="5,0"/>
|
||||
@ -127,7 +132,9 @@
|
||||
<CheckBox Name="Installttaskbar" Content="Translucent Taskbar" Margin="5,0"/>
|
||||
<CheckBox Name="Installtreesize" Content="TreeSize Free" Margin="5,0"/>
|
||||
<CheckBox Name="Installwindirstat" Content="WinDirStat" Margin="5,0"/>
|
||||
<CheckBox Name="Installwiztree" Content="WizTree" Margin="5,0"/>
|
||||
<CheckBox Name="Installterminal" Content="Windows Terminal" Margin="5,0"/>
|
||||
<CheckBox Name="Installidm" Content="Internet Download Manager" Margin="5,0"/>
|
||||
<CheckBox Name="Installtwinkletray" Content="Twinkle Tray" 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"/>
|
||||
@ -160,13 +167,16 @@
|
||||
<CheckBox Name="EssTweaksWifi" Content="Disable Wifi-Sense" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksAH" Content="Disable Activity History" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksDeleteTempFiles" Content="Delete Temporary Files" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksDiskCleanup" Content="Delete Temporary Files" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksLoc" Content="Disable Location Tracking" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksHome" Content="Disable Homegroup" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksStorage" Content="Disable Storage Sense" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksHiber" Content="Disable Hibernation" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksDVR" Content="Disable GameDVR" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksServices" Content="Set Services to Manual" Margin="5,0"/>
|
||||
|
||||
<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="1" Grid.Column="1" Margin="10,5">
|
||||
@ -179,8 +189,12 @@
|
||||
<CheckBox Name="MiscTweaksDisplay" Content="Set Display for Performance" Margin="5,0"/>
|
||||
<CheckBox Name="MiscTweaksUTC" Content="Set Time to UTC (Dual Boot)" Margin="5,0"/>
|
||||
<CheckBox Name="MiscTweaksDisableUAC" Content="Disable UAC" Margin="5,0"/>
|
||||
<CheckBox Name="MiscTweaksDisableNotifications" Content="Disable Notification" Margin="5,0"/>
|
||||
<CheckBox Name="MiscTweaksDisableTPMCheck" Content="Disable TPM on Update" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksDeBloat" Content="Remove ALL MS Store Apps" Margin="5,0"/>
|
||||
|
||||
<CheckBox Name="EssTweaksRemoveCortana" Content="Remove Cortana" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksRemoveEdge" Content="Remove Microsoft Edge" Margin="5,0"/>
|
||||
<CheckBox Name="MiscTweaksRightClickMenu" Content="Set Classic Right-Click Menu " Margin="5,0"/>
|
||||
<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>
|
||||
|
@ -1,5 +1,8 @@
|
||||
{
|
||||
"install": {
|
||||
"Installlibreoffice": {
|
||||
"winget": "TheDocumentFoundation.LibreOffice"
|
||||
},
|
||||
"Installadobe": {
|
||||
"winget": "Adobe.Acrobat.Reader.64-bit"
|
||||
},
|
||||
@ -33,6 +36,9 @@
|
||||
"Installchrome": {
|
||||
"winget": "Google.Chrome"
|
||||
},
|
||||
"Installtor": {
|
||||
"winget": "TorProject.TorBrowser"
|
||||
},
|
||||
"Installchromium": {
|
||||
"winget": "eloston.ungoogled-chromium"
|
||||
},
|
||||
@ -75,6 +81,9 @@
|
||||
"Installgpuz": {
|
||||
"winget": "TechPowerUp.GPU-Z"
|
||||
},
|
||||
"Installglaryutilities": {
|
||||
"winget": "Glarysoft.GlaryUtilities"
|
||||
},
|
||||
"Installgreenshot": {
|
||||
"winget": "Greenshot.Greenshot"
|
||||
},
|
||||
@ -195,6 +204,9 @@
|
||||
"Installterminal": {
|
||||
"winget": "Microsoft.WindowsTerminal"
|
||||
},
|
||||
"Installidm": {
|
||||
"winget": "Tonec.InternetDownloadManager"
|
||||
},
|
||||
"Installtreesize": {
|
||||
"winget": "JAMSoftware.TreeSize.Free"
|
||||
},
|
||||
@ -210,6 +222,9 @@
|
||||
"Installvlc": {
|
||||
"winget": "VideoLAN.VLC"
|
||||
},
|
||||
"Installkdenlive": {
|
||||
"winget": "KDE.Kdenlive"
|
||||
},
|
||||
"Installvoicemeeter": {
|
||||
"winget": "VB-Audio.Voicemeeter"
|
||||
},
|
||||
@ -222,15 +237,24 @@
|
||||
"Installwindirstat": {
|
||||
"winget": "WinDirStat.WinDirStat"
|
||||
},
|
||||
"Installwiztree": {
|
||||
"winget": "AntibodySoftware.WizTree"
|
||||
},
|
||||
"Installwinscp": {
|
||||
"winget": "WinSCP.WinSCP"
|
||||
},
|
||||
"Installwireshark": {
|
||||
"winget": "WiresharkFoundation.Wireshark"
|
||||
},
|
||||
"Installsimplewall": {
|
||||
"winget": "Henry++.simplewall"
|
||||
},
|
||||
"Installzoom": {
|
||||
"winget": "Zoom.Zoom"
|
||||
},
|
||||
"Installviber": {
|
||||
"winget": "Viber.Viber"
|
||||
},
|
||||
"Installtwinkletray": {
|
||||
"winget": "xanderfrangos.twinkletray"
|
||||
}
|
||||
|
186
winutil.ps1
186
winutil.ps1
@ -5,8 +5,8 @@
|
||||
Version 0.0.1
|
||||
#>
|
||||
|
||||
# $inputXML = Get-Content "MainWindow.xaml" #uncomment for development
|
||||
$inputXML = (new-object Net.WebClient).DownloadString("https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/MainWindow.xaml") #uncomment for Production
|
||||
$inputXML = Get-Content "MainWindow.xaml" #uncomment for development
|
||||
# $inputXML = (new-object Net.WebClient).DownloadString("https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/MainWindow.xaml") #uncomment for Production
|
||||
|
||||
$inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window'
|
||||
[void][System.Reflection.Assembly]::LoadWithPartialName('presentationframework')
|
||||
@ -107,6 +107,10 @@ $WPFTab4BT.Add_Click({
|
||||
#===========================================================================
|
||||
$WPFinstall.Add_Click({
|
||||
$wingetinstall = New-Object System.Collections.Generic.List[System.Object]
|
||||
If ( $WPFInstalllibreoffice.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("TheDocumentFoundation.LibreOffice")
|
||||
$WPFInstalllibreoffice.IsChecked = $false
|
||||
}
|
||||
If ( $WPFInstalladobe.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("Adobe.Acrobat.Reader.64-bit")
|
||||
$WPFInstalladobe.IsChecked = $false
|
||||
@ -135,6 +139,10 @@ $WPFinstall.Add_Click({
|
||||
$wingetinstall.Add("Google.Chrome")
|
||||
$WPFInstallchrome.IsChecked = $false
|
||||
}
|
||||
If ( $WPFInstalltor.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("TorProject.TorBrowser")
|
||||
$WPFInstalltor.IsChecked = $false
|
||||
}
|
||||
If ( $WPFInstalldiscord.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("Discord.Discord")
|
||||
$WPFInstalldiscord.IsChecked = $false
|
||||
@ -232,6 +240,10 @@ $WPFinstall.Add_Click({
|
||||
$wingetinstall.Add("Microsoft.WindowsTerminal")
|
||||
$WPFInstallterminal.IsChecked = $false
|
||||
}
|
||||
If ( $WPFInstallidm.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("Tonec.InternetDownloadManager")
|
||||
$WPFInstallidm.IsChecked = $false
|
||||
}
|
||||
If ( $WPFInstallalacritty.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("Alacritty.Alacritty")
|
||||
$WPFInstallalacritty.IsChecked = $false
|
||||
@ -244,6 +256,10 @@ $WPFinstall.Add_Click({
|
||||
$wingetinstall.Add("VideoLAN.VLC")
|
||||
$WPFInstallvlc.IsChecked = $false
|
||||
}
|
||||
If ( $WPFInstallkdenlive.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("KDE.Kdenlive")
|
||||
$WPFInstallkdenlive.IsChecked = $false
|
||||
}
|
||||
If ( $WPFInstallvscode.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("Git.Git")
|
||||
$wingetinstall.Add("Microsoft.VisualStudioCode --source winget")
|
||||
@ -302,6 +318,10 @@ $WPFinstall.Add_Click({
|
||||
$wingetinstall.Add("TechPowerUp.GPU-Z")
|
||||
$WPFInstallgpuz.IsChecked = $false
|
||||
}
|
||||
If ( $WPFInstallglaryutilities.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("Glarysoft.GlaryUtilities")
|
||||
$WPFInstallglaryutilities.IsChecked = $false
|
||||
}
|
||||
If ( $WPFInstallgreenshot.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("Greenshot.Greenshot")
|
||||
$WPFInstallgreenshot.IsChecked = $false
|
||||
@ -409,15 +429,27 @@ $WPFinstall.Add_Click({
|
||||
If ( $WPFInstallwindirstat.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("WinDirStat.WinDirStat")
|
||||
$WPFInstallwindirstat.IsChecked = $false
|
||||
}
|
||||
}
|
||||
If ( $WPFInstallwiztree.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("AntibodySoftware.WizTree")
|
||||
$WPFInstallwiztree.IsChecked = $false
|
||||
}
|
||||
If ( $WPFInstallwireshark.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("WiresharkFoundation.Wireshark")
|
||||
$WPFInstallwireshark.IsChecked = $false
|
||||
}
|
||||
}
|
||||
If ( $WPFInstallsimplewall.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("Henry++.simplewall")
|
||||
$WPFInstallsimplewall.IsChecked = $false
|
||||
}
|
||||
If ( $WPFInstallzoom.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("Zoom.Zoom")
|
||||
$WPFInstallzoom.IsChecked = $false
|
||||
}
|
||||
If ( $WPFInstallviber.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("Viber.Viber")
|
||||
$WPFInstallviber.IsChecked = $false
|
||||
}
|
||||
If ( $WPFInstalltwinkletray.IsChecked -eq $true ) {
|
||||
$wingetinstall.Add("xanderfrangos.twinkletray")
|
||||
$WPFInstalltwinkletray.IsChecked = $false
|
||||
@ -436,15 +468,15 @@ $WPFinstall.Add_Click({
|
||||
Write-Host "Running Alternative Installer for LTSC/Server Editions"
|
||||
|
||||
#Download Needed Files
|
||||
Write-Host "Downloading Needed Files..."
|
||||
Start-BitsTransfer -Source "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx" -Destination "./Microsoft.VCLibs.x64.14.00.Desktop.appx"
|
||||
Start-BitsTransfer -Source "https://github.com/microsoft/winget-cli/releases/download/v1.2.10271/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -Destination "./Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
|
||||
Start-BitsTransfer -Source "https://github.com/microsoft/winget-cli/releases/download/v1.2.10271/b0a0692da1034339b76dce1c298a1e42_License1.xml" -Destination "./b0a0692da1034339b76dce1c298a1e42_License1.xml"
|
||||
Write-Host "Downloading Needed Files..."
|
||||
Start-BitsTransfer -Source "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx" -Destination "$env:TEMP\Microsoft.VCLibs.x64.14.00.Desktop.appx"
|
||||
Start-BitsTransfer -Source "https://github.com/microsoft/winget-cli/releases/download/v1.2.10271/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -Destination "$env:TEMP\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
|
||||
Start-BitsTransfer -Source "https://github.com/microsoft/winget-cli/releases/download/v1.2.10271/b0a0692da1034339b76dce1c298a1e42_License1.xml" -Destination "$env:TEMP\b0a0692da1034339b76dce1c298a1e42_License1.xml"
|
||||
|
||||
#Installing Packages
|
||||
Write-Host "Installing Packages..."
|
||||
Add-AppxProvisionedPackage -Online -PackagePath ".\Microsoft.VCLibs.x64.14.00.Desktop.appx" -SkipLicense
|
||||
Add-AppxProvisionedPackage -Online -PackagePath ".\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -LicensePath ".\b0a0692da1034339b76dce1c298a1e42_License1.xml"
|
||||
Add-AppxProvisionedPackage -Online -PackagePath "$env:TEMP\Microsoft.VCLibs.x64.14.00.Desktop.appx" -SkipLicense
|
||||
Add-AppxProvisionedPackage -Online -PackagePath "$env:TEMP\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -LicensePath "$env:TEMP\b0a0692da1034339b76dce1c298a1e42_License1.xml"
|
||||
Write-Host "winget Installed (Reboot might be required before winget will work)"
|
||||
|
||||
#Sleep for 5 seconds to maximize chance that winget will work without reboot
|
||||
@ -453,9 +485,9 @@ $WPFinstall.Add_Click({
|
||||
|
||||
#Removing no longer needed Files
|
||||
Write-Host "Removing no longer needed Files..."
|
||||
Remove-Item -Path ".\Microsoft.VCLibs.x64.14.00.Desktop.appx" -Force
|
||||
Remove-Item -Path ".\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -Force
|
||||
Remove-Item -Path ".\b0a0692da1034339b76dce1c298a1e42_License1.xml" -Force
|
||||
Remove-Item -Path "$env:TEMP\Microsoft.VCLibs.x64.14.00.Desktop.appx" -Force
|
||||
Remove-Item -Path "$env:TEMP\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -Force
|
||||
Remove-Item -Path "$env:TEMP\b0a0692da1034339b76dce1c298a1e42_License1.xml" -Force
|
||||
Write-Host "Removed Files that are no longer needed"
|
||||
}
|
||||
elseif (((Get-ComputerInfo).WindowsVersion) -lt "1809") {
|
||||
@ -484,7 +516,7 @@ $WPFinstall.Add_Click({
|
||||
$wingetResult = New-Object System.Collections.Generic.List[System.Object]
|
||||
foreach ( $node in $wingetinstall ) {
|
||||
try {
|
||||
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command winget install -e --accept-source-agreements --accept-package-agreements --silent $node | Out-Host" -Wait -WindowStyle Maximized
|
||||
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command winget install -e --accept-source-agreements --accept-package-agreements --silent $node | Out-Host" -NoNewWindow
|
||||
$wingetResult.Add("$node`n")
|
||||
}
|
||||
catch [System.InvalidOperationException] {
|
||||
@ -518,7 +550,7 @@ $WPFinstall.Add_Click({
|
||||
$WPFInstallUpgrade.Add_Click({
|
||||
$isUpgradeSuccess = $false
|
||||
try {
|
||||
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command winget upgrade --all | Out-Host" -Wait -WindowStyle Maximized
|
||||
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command winget upgrade --all | Out-Host" -Wait -NoNewWindow
|
||||
$isUpgradeSuccess = $true
|
||||
}
|
||||
catch [System.InvalidOperationException] {
|
||||
@ -542,6 +574,9 @@ $WPFdesktop.Add_Click({
|
||||
$WPFEssTweaksAH.IsChecked = $true
|
||||
$WPFEssTweaksDeleteTempFiles.IsChecked = $true
|
||||
$WPFEssTweaksDeBloat.IsChecked = $false
|
||||
$WPFEssTweaksRemoveCortana.IsChecked = $false
|
||||
$WPFEssTweaksRemoveEdge.IsChecked = $false
|
||||
$WPFEssTweaksDiskCleanup.IsChecked = $false
|
||||
$WPFEssTweaksDVR.IsChecked = $true
|
||||
$WPFEssTweaksHiber.IsChecked = $true
|
||||
$WPFEssTweaksHome.IsChecked = $true
|
||||
@ -552,6 +587,9 @@ $WPFdesktop.Add_Click({
|
||||
$WPFEssTweaksStorage.IsChecked = $true
|
||||
$WPFEssTweaksTele.IsChecked = $true
|
||||
$WPFEssTweaksWifi.IsChecked = $true
|
||||
$WPFMiscTweaksDisableUAC.IsChecked = $false
|
||||
$WPFMiscTweaksDisableNotifications.IsChecked = $false
|
||||
$WPFMiscTweaksRightClickMenu.IsChecked = $false
|
||||
$WPFMiscTweaksPower.IsChecked = $true
|
||||
$WPFMiscTweaksNum.IsChecked = $true
|
||||
$WPFMiscTweaksLapPower.IsChecked = $false
|
||||
@ -563,6 +601,9 @@ $WPFlaptop.Add_Click({
|
||||
$WPFEssTweaksAH.IsChecked = $true
|
||||
$WPFEssTweaksDeleteTempFiles.IsChecked = $true
|
||||
$WPFEssTweaksDeBloat.IsChecked = $false
|
||||
$WPFEssTweaksRemoveCortana.IsChecked = $false
|
||||
$WPFEssTweaksRemoveEdge.IsChecked = $false
|
||||
$WPFEssTweaksDiskCleanup.IsChecked = $false
|
||||
$WPFEssTweaksDVR.IsChecked = $true
|
||||
$WPFEssTweaksHiber.IsChecked = $false
|
||||
$WPFEssTweaksHome.IsChecked = $true
|
||||
@ -573,6 +614,9 @@ $WPFlaptop.Add_Click({
|
||||
$WPFEssTweaksStorage.IsChecked = $true
|
||||
$WPFEssTweaksTele.IsChecked = $true
|
||||
$WPFEssTweaksWifi.IsChecked = $true
|
||||
$WPFMiscTweaksDisableUAC.IsChecked = $false
|
||||
$WPFMiscTweaksDisableNotifications.IsChecked = $false
|
||||
$WPFMiscTweaksRightClickMenu.IsChecked = $false
|
||||
$WPFMiscTweaksLapPower.IsChecked = $true
|
||||
$WPFMiscTweaksLapNum.IsChecked = $true
|
||||
$WPFMiscTweaksPower.IsChecked = $false
|
||||
@ -584,6 +628,9 @@ $WPFminimal.Add_Click({
|
||||
$WPFEssTweaksAH.IsChecked = $false
|
||||
$WPFEssTweaksDeleteTempFiles.IsChecked = $false
|
||||
$WPFEssTweaksDeBloat.IsChecked = $false
|
||||
$WPFEssTweaksRemoveCortana.IsChecked = $false
|
||||
$WPFEssTweaksRemoveEdge.IsChecked = $false
|
||||
$WPFEssTweaksDiskCleanup.IsChecked = $false
|
||||
$WPFEssTweaksDVR.IsChecked = $false
|
||||
$WPFEssTweaksHiber.IsChecked = $false
|
||||
$WPFEssTweaksHome.IsChecked = $true
|
||||
@ -594,6 +641,9 @@ $WPFminimal.Add_Click({
|
||||
$WPFEssTweaksStorage.IsChecked = $false
|
||||
$WPFEssTweaksTele.IsChecked = $true
|
||||
$WPFEssTweaksWifi.IsChecked = $false
|
||||
$WPFMiscTweaksDisableUAC.IsChecked = $false
|
||||
$WPFMiscTweaksDisableNotifications.IsChecked = $false
|
||||
$WPFMiscTweaksRightClickMenu.IsChecked = $false
|
||||
$WPFMiscTweaksPower.IsChecked = $false
|
||||
$WPFMiscTweaksNum.IsChecked = $false
|
||||
$WPFMiscTweaksLapPower.IsChecked = $false
|
||||
@ -602,6 +652,14 @@ $WPFminimal.Add_Click({
|
||||
|
||||
$WPFtweaksbutton.Add_Click({
|
||||
|
||||
If ( $WPFEssTweaksDVR.IsChecked -eq $true ) {
|
||||
#Installing PowerRun to edit some restricted registry keys (Need this to disable Gamebar Presence Writer)
|
||||
curl.exe -s "https://www.sordum.org/files/download/power-run/PowerRun.zip" -o ".\PowerRun.zip"
|
||||
Expand-Archive -Path ".\PowerRun.zip" -DestinationPath ".\" -Force
|
||||
Copy-Item -Path ".\PowerRun\PowerRun.exe" -Destination "$env:windir" -Force
|
||||
Remove-Item -Path ".\PowerRun\", ".\PowerRun.zip" -Recurse
|
||||
}
|
||||
|
||||
If ( $WPFEssTweaksAH.IsChecked -eq $true ) {
|
||||
Write-Host "Disabling Activity History..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "EnableActivityFeed" -Type DWord -Value 0
|
||||
@ -615,16 +673,27 @@ $WPFtweaksbutton.Add_Click({
|
||||
Get-ChildItem -Path "C:\Windows\Temp" *.* -Recurse | Remove-Item -Force -Recurse
|
||||
Get-ChildItem -Path $env:TEMP *.* -Recurse | Remove-Item -Force -Recurse
|
||||
$WPFEssTweaksDeleteTempFiles.IsChecked = $false
|
||||
Write-Host "================================="
|
||||
Write-Host "--- !!!!ERRORS ARE NORMAL!!!! ---"
|
||||
Write-Host "--- Cleaned following folders:---"
|
||||
Write-Host "--- C:\Windows\Temp ---"
|
||||
Write-Host "---"$env:TEMP"---"
|
||||
Write-Host "================================="
|
||||
}
|
||||
|
||||
If ( $WPFEssTweaksDVR.IsChecked -eq $true ) {
|
||||
If (!(Test-Path "HKCU:\System\GameConfigStore")) {
|
||||
New-Item -Path "HKCU:\System\GameConfigStore" -Force
|
||||
}
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_DXGIHonorFSEWindowsCompatible" -Type DWord -Value 0 -Force
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_HonorUserFSEBehaviorMode" -Type DWord -Value 0 -Force
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_EFSEFeatureFlags" -Type DWord -Value 0 -Force
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 0 -Force
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_DXGIHonorFSEWindowsCompatible" -Type DWord -Value 1
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_HonorUserFSEBehaviorMode" -Type DWord -Value 1
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_EFSEFeatureFlags" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_FSEBehavior" -Type DWord -Value 2
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Name "AllowGameDVR" -Type DWord -Value 0
|
||||
|
||||
#Disabling Gamebar Presence Writer, which causes stutter in games
|
||||
PowerRun.exe /SW:0 Powershell.exe -command {Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Gaming.GameBar.PresenceServer.Internal.PresenceWriter" -Name "ActivationType" -Type DWord -Value 0}
|
||||
|
||||
$WPFEssTweaksDVR.IsChecked = $false
|
||||
}
|
||||
@ -636,7 +705,6 @@ $WPFtweaksbutton.Add_Click({
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" -Name "ShowHibernateOption" -Type Dword -Value 0
|
||||
$WPFEssTweaksHiber.IsChecked = $false
|
||||
|
||||
}
|
||||
If ( $WPFEssTweaksHome.IsChecked -eq $true ) {
|
||||
$WPFEssTweaksHome.IsChecked = $false
|
||||
@ -653,6 +721,43 @@ $WPFtweaksbutton.Add_Click({
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\Maps" -Name "AutoUpdateEnabled" -Type DWord -Value 0
|
||||
$WPFEssTweaksLoc.IsChecked = $false
|
||||
}
|
||||
If ( $WPFMiscTweaksDisableTPMCheck.IsChecked -eq $true ) {
|
||||
Write-Host "Disabling TPM Check..."
|
||||
If (!(Test-Path "HKLM:\SYSTEM\Setup\MoSetup")) {
|
||||
New-Item -Path "HKLM:\SYSTEM\Setup\MoSetup" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\Setup\MoSetup" -Name "AllowUpgradesWithUnsupportedTPM" -Type DWord -Value 1
|
||||
$WPFMiscTweaksDisableTPMCheck.IsChecked = $false
|
||||
}
|
||||
If ( $WPFEssTweaksDiskCleanup.IsChecked -eq $true ) {
|
||||
Write-Host "Running Disk Cleanup on Drive C:..."
|
||||
cmd /c cleanmgr.exe /d C: /VERYLOWDISK
|
||||
$WPFEssTweaksDiskCleanup.IsChecked = $false
|
||||
}
|
||||
If ( $WPFMiscTweaksDisableUAC.IsChecked -eq $true) {
|
||||
Write-Host "Disabling UAC..."
|
||||
# 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.
|
||||
# Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableLUA" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Type DWord -Value 0 # Default is 5
|
||||
# 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.
|
||||
# It will just not bother u anymore
|
||||
$WPFMiscTweaksDisableUAC.IsChecked = $false
|
||||
}
|
||||
|
||||
If ( $WPFMiscTweaksDisableNotifications.IsChecked -eq $true ) {
|
||||
Write-Host "Disabling Notifications and Action Center..."
|
||||
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
|
||||
New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled" -PropertyType "DWord" -Value 0 -force
|
||||
$WPFMiscTweaksDisableNotifications.IsChecked = $false
|
||||
}
|
||||
|
||||
If ( $WPFMiscTweaksRightClickMenu.IsChecked -eq $true ) {
|
||||
Write-Host "Setting Classic Right-Click Menu..."
|
||||
New-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" -Name "InprocServer32" -force -value ""
|
||||
$WPFMiscTweaksRightClickMenu.IsChecked = $false
|
||||
}
|
||||
If ( $WPFEssTweaksOO.IsChecked -eq $true ) {
|
||||
Write-Host "Running O&O Shutup with Recommended Settings"
|
||||
curl.exe -ss "https://raw.githubusercontent.com/ChrisTitusTech/win10script/master/ooshutup10.cfg" -o ooshutup10.cfg
|
||||
@ -866,6 +971,9 @@ $WPFtweaksbutton.Add_Click({
|
||||
Write-Host "Changing default Explorer view to This PC..."
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "LaunchTo" -Type DWord -Value 1
|
||||
|
||||
## Enable Long Paths
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Type DWORD -Value 1
|
||||
|
||||
Write-Host "Hiding 3D Objects icon from This PC..."
|
||||
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" -Recurse -ErrorAction SilentlyContinue
|
||||
|
||||
@ -975,9 +1083,8 @@ $WPFtweaksbutton.Add_Click({
|
||||
If ( $WPFMiscTweaksUTC.IsChecked -eq $true ) {
|
||||
Write-Host "Setting BIOS time to UTC..."
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -Type DWord -Value 1
|
||||
$WPFMiscTweaksUTC.IsChecked
|
||||
$WPFMiscTweaksUTC.IsChecked = $false
|
||||
}
|
||||
|
||||
If ( $WPFMiscTweaksDisplay.IsChecked -eq $true ) {
|
||||
Write-Host "Adjusting visual effects for performance..."
|
||||
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "DragFullWindows" -Type String -Value 0
|
||||
@ -993,7 +1100,16 @@ $WPFtweaksbutton.Add_Click({
|
||||
Write-Host "Adjusted visual effects for performance"
|
||||
$WPFMiscTweaksDisplay.IsChecked = $false
|
||||
}
|
||||
|
||||
If ( $WPFEssTweaksRemoveCortana.IsChecked -eq $true ) {
|
||||
Write-Host "Removing Cortana..."
|
||||
Get-AppxPackage -allusers Microsoft.549981C3F5F10 | Remove-AppxPackage
|
||||
$WPFEssTweaksRemoveCortana.IsChecked = $false
|
||||
}
|
||||
If ( $WPFEssTweaksRemoveEdge.IsChecked -eq $true ) {
|
||||
Write-Host "Removing Microsoft Edge..."
|
||||
iwr -useb https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/Edge_Removal.bat | iex
|
||||
$WPFEssTweaksRemoveEdge.IsChecked = $false
|
||||
}
|
||||
If ( $WPFEssTweaksDeBloat.IsChecked -eq $true ) {
|
||||
$Bloatware = @(
|
||||
#Unnecessary Windows 10 AppX Apps
|
||||
@ -1119,6 +1235,22 @@ $WPFtweaksbutton.Add_Click({
|
||||
|
||||
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||
})
|
||||
|
||||
$WPFEnableDarkMode.Add_Click({
|
||||
Write-Host "Enabling Dark Mode"
|
||||
$Theme = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
||||
Set-ItemProperty $Theme AppsUseLightTheme -Value 0
|
||||
Write-Host "Enabled"
|
||||
}
|
||||
)
|
||||
|
||||
$WPFDisableDarkMode.Add_Click({
|
||||
Write-Host "Disabling Dark Mode"
|
||||
$Theme = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
||||
Set-ItemProperty $Theme AppsUseLightTheme -Value 1
|
||||
Write-Host "Disabled"
|
||||
}
|
||||
)
|
||||
#===========================================================================
|
||||
# Undo All
|
||||
#===========================================================================
|
||||
@ -1247,8 +1379,16 @@ $WPFundoall.Add_Click({
|
||||
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 "Done - Reverted to Stock Settings"
|
||||
|
||||
#Enable Gamebar Presence Writer
|
||||
PowerRun.exe /SW:0 Powershell.exe -command {Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Gaming.GameBar.PresenceServer.Internal.PresenceWriter" -Name "ActivationType" -Type DWord -Value 1}
|
||||
|
||||
Write-Host "Essential Undo Completed"
|
||||
|
||||
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||
|
Loading…
Reference in New Issue
Block a user