Skip to content

Commit abca350

Browse files
committed
Adding Visual Studio dummy version protection
1 parent 0f3735d commit abca350

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/dotnet-core-uninstall/Windows/RegistryQuery.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ private static bool IsDotNetCoreBundle(RegistryKey registryKey)
4949
{
5050
return IsDotNetCoreBundleDisplayName(registryKey.GetValue("DisplayName") as string)
5151
&& IsDotNetCoreBundlePublisher(registryKey.GetValue("Publisher") as string)
52-
&& IsDotNetCoreBundleUninstaller(registryKey.GetValue("WindowsInstaller") as int?);
52+
&& IsDotNetCoreBundleUninstaller(registryKey.GetValue("WindowsInstaller") as int?)
53+
&& IsNotVisualStudioDummyVersion(registryKey.GetValue("DisplayName") as string);
54+
}
55+
56+
private static bool IsNotVisualStudioDummyVersion(string displayName)
57+
{
58+
return !displayName.Contains(" from Visual Studio");
5359
}
5460

5561
private static bool IsDotNetCoreBundleDisplayName(string displayName)

0 commit comments

Comments
 (0)