Fix reboot registration

This commit is contained in:
Manuel Thalmann 2023-06-25 15:05:59 +02:00
parent 4fb085a782
commit 38a1e3a225

View file

@ -79,7 +79,7 @@ class Context {
return Get-Item $userKey "$userKey\Software\Microsoft\Windows\CurrentVersion\RunOnce"; return Get-Item $userKey "$userKey\Software\Microsoft\Windows\CurrentVersion\RunOnce";
} }
[void] RegisterReboot([Microsoft.Win32.RegistryKey] $userKey) { [void] RegisterReboot([Microsoft.Win32.RegistryKey] $userKey = $null) {
$null = New-ItemProperty -Path $this.GetRunOnceKey($userKey) -Name $this.RunOnceName -Value "pwsh `"$($this.EntryPoint)`"" -PropertyType ExpandString; $null = New-ItemProperty -Path $this.GetRunOnceKey($userKey) -Name $this.RunOnceName -Value "pwsh `"$($this.EntryPoint)`"" -PropertyType ExpandString;
} }