Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e251d32

Browse files
committedFeb 17, 2025·
Don't throw an exception when deleting the crashtracking key
1 parent 7d24b3d commit e251d32

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎tracer/src/Datadog.FleetInstaller/RegistryHelper.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static bool RemoveCrashTrackingKey(ILogger log, TracerValues values, stri
5151
try
5252
{
5353
var key = Registry.LocalMachine.OpenSubKey(registryKeyName, writable: true);
54-
key?.DeleteValue(crashHandlerPath);
54+
key?.DeleteValue(crashHandlerPath, throwOnMissingValue: false);
5555
log.WriteInfo($"Crash tracking handler path '{crashHandlerPath}' removed from '{registryKeyName}'");
5656

5757
return true;
@@ -83,6 +83,8 @@ public static bool TryGetIisVersion(ILogger log, [NotNullWhen(true)] out Version
8383
var minor = key.GetValue("MinorVersion") as int? ?? 0;
8484

8585
version = new(major: major, minor: minor);
86+
87+
log.WriteInfo($"Found IIS version: '{major}.{minor}'");
8688
return true;
8789
}
8890
catch (Exception ex)

0 commit comments

Comments
 (0)
Please sign in to comment.