Fix registry editing commands
This commit is contained in:
parent
eed0ddc82b
commit
fb41e37fa2
1 changed files with 2 additions and 2 deletions
|
@ -91,7 +91,7 @@ class Context {
|
|||
}
|
||||
|
||||
[void] RegisterReboot([Microsoft.Win32.RegistryKey] $userKey) {
|
||||
$null = $this.GetRunOnceKey($userKey).SetValue($this.RunOnceName, "pwsh `"$($this.EntryPoint)`"", "ExpandString");
|
||||
$null = Set-ItemProperty -Path $this.GetRunOnceKey($userKey).PSPath -Value "pwsh `"$($this.EntryPoint)`"" -Type "ExpandString";
|
||||
}
|
||||
|
||||
[void] RegisterNewUserReboot() {
|
||||
|
@ -99,7 +99,7 @@ class Context {
|
|||
}
|
||||
|
||||
[void] DeregisterNewUserReboot() {
|
||||
$this.ProcessDefaultUserKey({ param ($root) $this.GetRunOnceKey($root).DeleteValue($this.RunOnceName) });
|
||||
$this.ProcessDefaultUserKey({ param ($root) Remove-ItemProperty -Path $this.GetRunOnceKey($root).PSPath $this.RunOnceName });
|
||||
}
|
||||
|
||||
[void] Reboot() {
|
||||
|
|
Loading…
Reference in a new issue