Fix quotation

This commit is contained in:
Manuel Thalmann 2023-06-29 02:53:54 +02:00
parent ecf6b0c573
commit 2f6ee57525

View file

@ -90,12 +90,12 @@ function Enable-UACNextLogin([Context] $context) {
" ", " ",
@( @(
"-c", "-c",
"Set-ItemProperty `"$keyPath`" -Name `"$propertyName`" -Value 0;", "Set-ItemProperty '$keyPath' -Name '$propertyName' -Value 0;",
"Unregister-ScheduledTask -Force $uacDisablerName;", "Unregister-ScheduledTask -Force '$uacDisablerName';",
". `"$PSScriptRoot/../Scripts/Context.ps1`";", ". '$PSScriptRoot/../Scripts/Context.ps1';",
"`$context = [Context]::new();", "`$context = [Context]::new();",
"`$context.EntryPoint = `"$($context.EntryPoint)`";", "`$context.EntryPoint = '$($context.EntryPoint)';",
"`$context.RegisterReboot((Get-Item `"Registry::HKEY_USERS\$((Get-LocalUser $context.UserName).SID)));", "`$context.RegisterReboot((Get-Item 'Registry::HKEY_USERS\$((Get-LocalUser $context.UserName).SID)'));",
"Restart-Computer;"))); "Restart-Computer;")));
$trigger = New-ScheduledTaskTrigger -AtLogOn; $trigger = New-ScheduledTaskTrigger -AtLogOn;