@@ -54,25 +54,6 @@ class SystemInfo extends FramerateCategory {
5454 if (osName != " " )
5555 osInfo = ' ${osName } ${osVersion }' .trim ();
5656 }
57- #elseif windows
58- var windowsCurrentVersionPath = " SOFTWARE\\ Microsoft\\ Windows NT\\ CurrentVersion" ;
59- var buildNumber = Std .parseInt (RegistryUtil .get (HKEY_LOCAL_MACHINE , windowsCurrentVersionPath , " CurrentBuildNumber" ));
60- var edition = RegistryUtil .get (HKEY_LOCAL_MACHINE , windowsCurrentVersionPath , " ProductName" );
61-
62- var lcuKey = " WinREVersion" ; // Last Cumulative Update Key On Older Windows Versions
63- if (buildNumber >= 22000 ) { // Windows 11 Initial Release Build Number
64- edition = edition .replace (" Windows 10" , " Windows 11" );
65- lcuKey = " LCUVer" ; // Last Cumulative Update Key On Windows 11
66- }
67-
68- var lcuVersion = RegistryUtil .get (HKEY_LOCAL_MACHINE , windowsCurrentVersionPath , lcuKey );
69-
70- osInfo = edition ;
71-
72- if (lcuVersion != null && lcuVersion != " " )
73- osInfo + = ' ${lcuVersion }' ;
74- else if (lime.system. System .platformVersion != null && lime.system. System .platformVersion != " " )
75- osInfo + = ' ${lime.system. System .platformVersion }' ;
7657 #else
7758 if (lime.system. System .platformLabel != null && lime.system. System .platformLabel != " " && lime.system. System .platformVersion != null && lime.system. System .platformVersion != " " )
7859 osInfo = ' ${lime.system. System .platformLabel .replace (lime.system. System .platformVersion , " " ).trim ()} ${lime.system. System .platformVersion }' ;
@@ -82,7 +63,10 @@ class SystemInfo extends FramerateCategory {
8263
8364 try {
8465 #if windows
85- cpuName = RegistryUtil .get (HKEY_LOCAL_MACHINE , " HARDWARE\\ DESCRIPTION\\ System\\ CentralProcessor\\ 0" , " ProcessorNameString" );
66+ var process = new HiddenProcess (" wmic" , [" cpu" , " get" , " name" ]);
67+ if (process .exitCode () != 0 ) throw ' Could not fetch CPU information' ;
68+
69+ cpuName = process .stdout .readAll ().toString ().trim ().split (" \n " )[1 ].trim ();
8670 #elseif mac
8771 var process = new HiddenProcess (" sysctl -a | grep brand_string" ); // Somehow this isn't able to use the args but it still works
8872 if (process .exitCode () != 0 ) throw ' Could not fetch CPU information' ;
0 commit comments