diff --git a/src/go/tmpl/templates/windows_startup.tmpl b/src/go/tmpl/templates/windows_startup.tmpl index 6f328a24..eee3ccea 100644 --- a/src/go/tmpl/templates/windows_startup.tmpl +++ b/src/go/tmpl/templates/windows_startup.tmpl @@ -24,6 +24,10 @@ function Phenix-SetStartupStatus($status) { } function Phenix-StartupStatusIsSet { + If (-NOT (Test-Path 'HKLM:\Software\phenix')) { + return $false + } + $key = Get-Item -LiteralPath 'HKLM:\Software\phenix' -ErrorAction SilentlyContinue if ($key) { @@ -40,6 +44,10 @@ function Phenix-StartupStatusIsSet { } function Phenix-StartupStatusIs($status) { + If (-NOT (Test-Path 'HKLM:\Software\phenix')) { + return $false + } + $key = Get-Item -LiteralPath 'HKLM:\Software\phenix' -ErrorAction SilentlyContinue if ($key) {