mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-24 03:45:30 +00:00
Compare commits
3 Commits
1da576458b
...
e9e9b44979
Author | SHA1 | Date | |
---|---|---|---|
|
e9e9b44979 | ||
|
2359a1d163 | ||
|
6e708bfe95 |
@ -52,7 +52,7 @@ If you have Issues, refer to [Known Issues](https://christitustech.github.io/win
|
||||
|
||||
These are the sponsors that help keep this project alive with monthly contributions.
|
||||
|
||||
<!-- sponsors --><a href="https://github.com/ysaito8015"><img src="https://avatars.githubusercontent.com/u/3502978?u=ca98bf67f04d67080df0feeaa6f007fad51d273f&v=4" width="60px" alt="Yusuke Saito" /></a><a href="https://github.com/TriHydera"><img src="https://avatars.githubusercontent.com/u/39857764?u=5dbda638f45530582eee1703b4473f2a5e229e28&v=4" width="60px" alt="TriHydera" /></a><a href="https://github.com/jozozovko"><img src="https://avatars.githubusercontent.com/u/3272468?u=4391ed4655e4fd8b56e23b4169e44e2ac9b6cd97&v=4" width="60px" alt="" /></a><a href="https://github.com/DelDongo"><img src="https://avatars.githubusercontent.com/u/127976398?v=4" width="60px" alt="" /></a><a href="https://github.com/markamos"><img src="https://avatars.githubusercontent.com/u/9561861?u=3cca179dcff0413538591e57a3abea116d65ce56&v=4" width="60px" alt="Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://avatars.githubusercontent.com/u/54533224?u=a49ea000a8f52adb31382ea69a1a7501b27fefdd&v=4" width="60px" alt="" /></a><a href="https://github.com/mews-se"><img src="https://avatars.githubusercontent.com/u/58894405?v=4" width="60px" alt="" /></a><a href="https://github.com/jdiegmueller"><img src="https://avatars.githubusercontent.com/u/18660571?u=601d0a23040a271c86b5d40339f899a6dbf27086&v=4" width="60px" alt="Jason A. Diegmueller" /></a><a href="https://github.com/AlanTristar"><img src="https://avatars.githubusercontent.com/u/105566568?v=4" width="60px" alt="" /></a><a href="https://github.com/zepled112"><img src="https://avatars.githubusercontent.com/u/65176625?v=4" width="60px" alt="wyatt" /></a><a href="https://github.com/altugtekiner"><img src="https://avatars.githubusercontent.com/u/105917451?u=ee73ff639c7bd9feb4708ab4ba7b14eff80196f7&v=4" width="60px" alt="" /></a><a href="https://github.com/robertsandrock"><img src="https://avatars.githubusercontent.com/u/12015331?v=4" width="60px" alt="RMS" /></a><a href="https://github.com/mmomega"><img src="https://avatars.githubusercontent.com/u/71956566?v=4" width="60px" alt="" /></a><a href="https://github.com/KenichiQaz"><img src="https://avatars.githubusercontent.com/u/31177857?u=efdbae734a4c60a7bb95df4659d0535e60a6fd57&v=4" width="60px" alt="Stefan" /></a><a href="https://github.com/paulsheets"><img src="https://avatars.githubusercontent.com/u/45240946?u=d4db66f8e8d7a2606fe7a5521daf48ca9f097105&v=4" width="60px" alt="Paul" /></a><a href="https://github.com/djones369"><img src="https://avatars.githubusercontent.com/u/4107092?v=4" width="60px" alt="Dave Jones" /></a><a href="https://github.com/anthonymendez"><img src="https://avatars.githubusercontent.com/u/19240897?u=f82b4be098cac65c8421421b70ebd2d1da85c67e&v=4" width="60px" alt="Anthony Mendez" /></a><a href="https://github.com/xBandaku"><img src="https://avatars.githubusercontent.com/u/142067112?u=0c9a1edee45ac2a0a42827d418a12b1791d52350&v=4" width="60px" alt="xPandaku" /></a><a href="https://github.com/claudemods"><img src="https://avatars.githubusercontent.com/u/73653396?u=d64c656fb8db24ef56bb000197532df9b618d06c&v=4" width="60px" alt="Claudemods" /></a><a href="https://github.com/FatBastard0"><img src="https://avatars.githubusercontent.com/u/173957728?v=4" width="60px" alt="" /></a><a href="https://github.com/Ascent7910"><img src="https://avatars.githubusercontent.com/u/118260621?v=4" width="60px" alt="Max" /></a><a href="https://github.com/DursleyGuy"><img src="https://avatars.githubusercontent.com/u/140165544?v=4" width="60px" alt="DursleyGuy" /></a><a href="https://github.com/YamiSandman616"><img src="https://avatars.githubusercontent.com/u/183505690?u=c3bd20157058b6215e28f7568d4f8c4fbbe92838&v=4" width="60px" alt="Sandman616" /></a><a href="https://github.com/realmuddy"><img src="https://avatars.githubusercontent.com/u/30978236?v=4" width="60px" alt="Phillip Waters" /></a><a href="https://github.com/Tariq-Al-Zahrani"><img src="https://avatars.githubusercontent.com/u/187593049?v=4" width="60px" alt="" /></a><!-- sponsors -->
|
||||
<!-- sponsors --><a href="https://github.com/ysaito8015"><img src="https://avatars.githubusercontent.com/u/3502978?u=ca98bf67f04d67080df0feeaa6f007fad51d273f&v=4" width="60px" alt="Yusuke Saito" /></a><a href="https://github.com/TriHydera"><img src="https://avatars.githubusercontent.com/u/39857764?u=5dbda638f45530582eee1703b4473f2a5e229e28&v=4" width="60px" alt="TriHydera" /></a><a href="https://github.com/jozozovko"><img src="https://avatars.githubusercontent.com/u/3272468?u=4391ed4655e4fd8b56e23b4169e44e2ac9b6cd97&v=4" width="60px" alt="" /></a><a href="https://github.com/DelDongo"><img src="https://avatars.githubusercontent.com/u/127976398?v=4" width="60px" alt="" /></a><a href="https://github.com/markamos"><img src="https://avatars.githubusercontent.com/u/9561861?u=3cca179dcff0413538591e57a3abea116d65ce56&v=4" width="60px" alt="Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://avatars.githubusercontent.com/u/54533224?u=a49ea000a8f52adb31382ea69a1a7501b27fefdd&v=4" width="60px" alt="" /></a><a href="https://github.com/mews-se"><img src="https://avatars.githubusercontent.com/u/58894405?v=4" width="60px" alt="" /></a><a href="https://github.com/jdiegmueller"><img src="https://avatars.githubusercontent.com/u/18660571?u=601d0a23040a271c86b5d40339f899a6dbf27086&v=4" width="60px" alt="Jason A. Diegmueller" /></a><a href="https://github.com/AlanTristar"><img src="https://avatars.githubusercontent.com/u/105566568?v=4" width="60px" alt="" /></a><a href="https://github.com/zepled112"><img src="https://avatars.githubusercontent.com/u/65176625?v=4" width="60px" alt="wyatt" /></a><a href="https://github.com/altugtekiner"><img src="https://avatars.githubusercontent.com/u/105917451?u=ee73ff639c7bd9feb4708ab4ba7b14eff80196f7&v=4" width="60px" alt="" /></a><a href="https://github.com/robertsandrock"><img src="https://avatars.githubusercontent.com/u/12015331?v=4" width="60px" alt="RMS" /></a><a href="https://github.com/mmomega"><img src="https://avatars.githubusercontent.com/u/71956566?v=4" width="60px" alt="" /></a><a href="https://github.com/KenichiQaz"><img src="https://avatars.githubusercontent.com/u/31177857?u=efdbae734a4c60a7bb95df4659d0535e60a6fd57&v=4" width="60px" alt="Stefan" /></a><a href="https://github.com/paulsheets"><img src="https://avatars.githubusercontent.com/u/45240946?u=d4db66f8e8d7a2606fe7a5521daf48ca9f097105&v=4" width="60px" alt="Paul" /></a><a href="https://github.com/djones369"><img src="https://avatars.githubusercontent.com/u/4107092?v=4" width="60px" alt="Dave Jones" /></a><a href="https://github.com/anthonymendez"><img src="https://avatars.githubusercontent.com/u/19240897?u=f82b4be098cac65c8421421b70ebd2d1da85c67e&v=4" width="60px" alt="Anthony Mendez" /></a><a href="https://github.com/claudemods"><img src="https://avatars.githubusercontent.com/u/73653396?u=d64c656fb8db24ef56bb000197532df9b618d06c&v=4" width="60px" alt="Claudemods" /></a><a href="https://github.com/FatBastard0"><img src="https://avatars.githubusercontent.com/u/173957728?v=4" width="60px" alt="" /></a><a href="https://github.com/Ascent7910"><img src="https://avatars.githubusercontent.com/u/118260621?v=4" width="60px" alt="Max" /></a><a href="https://github.com/DursleyGuy"><img src="https://avatars.githubusercontent.com/u/140165544?v=4" width="60px" alt="DursleyGuy" /></a><a href="https://github.com/YamiSandman616"><img src="https://avatars.githubusercontent.com/u/183505690?u=c3bd20157058b6215e28f7568d4f8c4fbbe92838&v=4" width="60px" alt="Sandman616" /></a><a href="https://github.com/realmuddy"><img src="https://avatars.githubusercontent.com/u/30978236?v=4" width="60px" alt="Phillip Waters" /></a><a href="https://github.com/Tariq-Al-Zahrani"><img src="https://avatars.githubusercontent.com/u/187593049?v=4" width="60px" alt="" /></a><!-- sponsors -->
|
||||
|
||||
## 🏅 Thanks to all Contributors
|
||||
Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.
|
||||
|
@ -16,25 +16,34 @@ Function Get-WinUtilToggleStatus {
|
||||
|
||||
$ToggleSwitchReg = $sync.configs.tweaks.$ToggleSwitch.registry
|
||||
|
||||
if (($ToggleSwitchReg.path -imatch "hku") -and !(Get-PSDrive -Name HKU -ErrorAction SilentlyContinue)) {
|
||||
$null = (New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS)
|
||||
if (Get-PSDrive -Name HKU -ErrorAction SilentlyContinue) {
|
||||
Write-Debug "HKU drive created successfully"
|
||||
} else {
|
||||
Write-Debug "Failed to create HKU drive"
|
||||
try {
|
||||
if (($ToggleSwitchReg.path -imatch "hku") -and !(Get-PSDrive -Name HKU -ErrorAction SilentlyContinue)) {
|
||||
$null = (New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS)
|
||||
if (Get-PSDrive -Name HKU -ErrorAction SilentlyContinue) {
|
||||
Write-Debug "HKU drive created successfully"
|
||||
} else {
|
||||
Write-Debug "Failed to create HKU drive"
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
Write-Error "An error occurred regarding the HKU Drive: $_"
|
||||
return $false
|
||||
}
|
||||
|
||||
if ($ToggleSwitchReg) {
|
||||
$count = 0
|
||||
|
||||
foreach ($regentry in $ToggleSwitchReg) {
|
||||
$regstate = (Get-ItemProperty -path $regentry.Path).$($regentry.Name)
|
||||
if ($regstate -eq $regentry.Value) {
|
||||
$count += 1
|
||||
Write-Debug "$($regentry.Name) is true (state: $regstate, value: $($regentry.Value), original: $($regentry.OriginalValue))"
|
||||
} else {
|
||||
Write-Debug "$($regentry.Name) is false (state: $regstate, value: $($regentry.Value), original: $($regentry.OriginalValue))"
|
||||
try {
|
||||
$regstate = (Get-ItemProperty -path $regentry.Path).$($regentry.Name)
|
||||
if ($regstate -eq $regentry.Value) {
|
||||
$count += 1
|
||||
Write-Debug "$($regentry.Name) is true (state: $regstate, value: $($regentry.Value), original: $($regentry.OriginalValue))"
|
||||
} else {
|
||||
Write-Debug "$($regentry.Name) is false (state: $regstate, value: $($regentry.Value), original: $($regentry.OriginalValue))"
|
||||
}
|
||||
} catch {
|
||||
Write-Error "An error occurred while accessing registry entry $($regentry.Path): $_"
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user