From d46a4331d8066ea74ebd48d958627f078e66a608 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2020 13:41:41 +0800 Subject: [PATCH] Bump Microsoft.Win32.Registry from 4.7.0 to 5.0.0 (#706) * Bump Microsoft.Win32.Registry from 4.7.0 to 5.0.0 Bumps [Microsoft.Win32.Registry](https://github.com/dotnet/runtime) from 4.7.0 to 5.0.0. - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/commits) Signed-off-by: dependabot[bot] * Update Program.cs Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Next Turn <45985406+NextTurn@users.noreply.github.com> --- src/WinSW.Core/WinSW.Core.csproj | 2 +- src/WinSW/Program.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/WinSW.Core/WinSW.Core.csproj b/src/WinSW.Core/WinSW.Core.csproj index c499823..5ffd4ae 100644 --- a/src/WinSW.Core/WinSW.Core.csproj +++ b/src/WinSW.Core/WinSW.Core.csproj @@ -16,7 +16,7 @@ - + diff --git a/src/WinSW/Program.cs b/src/WinSW/Program.cs index 44e6b5f..5d0bd44 100644 --- a/src/WinSW/Program.cs +++ b/src/WinSW/Program.cs @@ -1055,9 +1055,9 @@ namespace WinSW DateTime fileLastWriteTime = File.GetLastWriteTime(config.FullPath); using RegistryKey? registryKey = Registry.LocalMachine - .OpenSubKey("SYSTEM") - .OpenSubKey("CurrentControlSet") - .OpenSubKey("Services") + .OpenSubKey("SYSTEM")? + .OpenSubKey("CurrentControlSet")? + .OpenSubKey("Services")? .OpenSubKey(config.Name); if (registryKey is null)