mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-07-02 08:38:13 +00:00
fix: Removing "Microsoft" from windows model name
This commit is contained in:
parent
1390af967f
commit
79db70211f
1 changed files with 1 additions and 9 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue