mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 22:55:52 -06:00
Bugfix: New-PSDrive seems to return the "hku" itself so weirdly gets prepended to the return value so the result becomes ("hku", $false). In powershell pretty much every variable that exists is interpreted as $true so the toggle for numlock got incorrectly checked
This commit is contained in:
parent
a4fccd3c85
commit
feff1078d8
@ -17,7 +17,7 @@ Function Get-WinUtilToggleStatus {
|
|||||||
$ToggleSwitchReg = $sync.configs.tweaks.$ToggleSwitch.registry
|
$ToggleSwitchReg = $sync.configs.tweaks.$ToggleSwitch.registry
|
||||||
|
|
||||||
if (($ToggleSwitchReg.path -imatch "hku") -and !(Get-PSDrive -Name HKU -ErrorAction SilentlyContinue)) {
|
if (($ToggleSwitchReg.path -imatch "hku") -and !(Get-PSDrive -Name HKU -ErrorAction SilentlyContinue)) {
|
||||||
New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS
|
$null = New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS
|
||||||
write-host "Created HKU drive"
|
write-host "Created HKU drive"
|
||||||
if (Get-PSDrive -Name HKU -ErrorAction SilentlyContinue) {
|
if (Get-PSDrive -Name HKU -ErrorAction SilentlyContinue) {
|
||||||
Write-Host "HKU drive created successfully" -ForegroundColor Green
|
Write-Host "HKU drive created successfully" -ForegroundColor Green
|
||||||
|
Loading…
Reference in New Issue
Block a user