Fix broken reboot registration
This commit is contained in:
parent
f01409fcd5
commit
92e4889417
1 changed files with 4 additions and 3 deletions
|
@ -141,7 +141,7 @@ $null = New-Module {
|
|||
[switch] $DefaultUser
|
||||
)
|
||||
|
||||
$register = { param($Key) Register-Setup -UserKey $Key; };
|
||||
$register = { param($UserKey) Register-Setup @PSBoundParameters; };
|
||||
|
||||
if ($DefaultUser) {
|
||||
Edit-DefaultUserKey {
|
||||
|
@ -149,11 +149,12 @@ $null = New-Module {
|
|||
[RegistryKey] $Key
|
||||
)
|
||||
|
||||
& $register -Key $Key;
|
||||
& $register $Key;
|
||||
}
|
||||
} else {
|
||||
& $register;
|
||||
}
|
||||
|
||||
& $register;
|
||||
Read-Host "Press enter to reboot";
|
||||
Restart-Computer -Force;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue