diff --git a/scripts/Windows/Scripts/Context.ps1 b/scripts/Windows/Scripts/Context.ps1 index 3ab4804e..e3670060 100644 --- a/scripts/Windows/Scripts/Context.ps1 +++ b/scripts/Windows/Scripts/Context.ps1 @@ -81,7 +81,13 @@ class Context { } Push-Location $userKey.PSPath; - $result = Get-Item "Software\Microsoft\Windows\CurrentVersion\RunOnce"; + $runOncePath = "Software\Microsoft\Windows\CurrentVersion\RunOnce"; + + if (-not (Test-Path $runOncePath)) { + New-Item $runOncePath; + } + + $result = Get-Item $runOncePath; Pop-Location; return $result; }