Skip to content

Commit f044c14

Browse files
committed
[CCP] Check Client/Server install via Installation Type
1 parent ed91d60 commit f044c14

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

Helpers/CompatChecks/WindowsServerRoleCCP.vb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,13 @@ Namespace Helpers.CompatChecks
7474
' The way we'll check for roles is by listing the features with DISM API. We'll also grab
7575
' the current version of our OS because compatibility also depends on the OS version.
7676
Try
77-
DynaLog.LogMessage("Getting current system edition ID...")
78-
Dim EditionRk As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows NT\CurrentVersion")
79-
Dim EditionId As String = EditionRk.GetValue("EditionID").ToString()
80-
DynaLog.LogMessage("Edition ID: " & EditionId)
81-
EditionRk.Close()
82-
If Not EditionId.Contains("Server") Then
77+
' We don't really need to check if we are not on a server version of Windows.
78+
DynaLog.LogMessage("Getting current system installation type...")
79+
Dim InstallationTypeRk As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows NT\CurrentVersion")
80+
Dim InstallationType As String = InstallationTypeRk.GetValue("InstallationType").ToString()
81+
DynaLog.LogMessage("Installation Type: " & InstallationType)
82+
InstallationTypeRk.Close()
83+
If Not InstallationType.Equals("Server", StringComparison.InvariantCultureIgnoreCase) Then
8384
DynaLog.LogMessage("This is not a server install, we don't need to do any of this...")
8485
' This is not a server edition, so we skip this CCP
8586
Status = New Classes.CompatibilityCheckerProviderStatus(True,

0 commit comments

Comments
 (0)