mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
fix: Removing "Microsoft" from windows model name
This commit is contained in:
@@ -26,16 +26,8 @@ namespace ICD.Common.Utils
|
||||
get
|
||||
{
|
||||
string productName = RegistryLocalMachineGetString(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ProductName");
|
||||
if (productName == string.Empty)
|
||||
return string.Empty;
|
||||
|
||||
string csdVersion = RegistryLocalMachineGetString(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CSDVersion");
|
||||
|
||||
string output = (productName.StartsWith("Microsoft") ? string.Empty : "Microsoft ") +
|
||||
productName +
|
||||
(csdVersion == string.Empty ? string.Empty : " " + csdVersion);
|
||||
|
||||
return output.Trim();
|
||||
return string.Format("{0} {1}", productName, csdVersion).Trim();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user