Skip to content

Portable Tool for an Ideal Windows Setup

memory type output & name search under condition Unknown deb v 5.2.8

Greedeks0a951f8c750d
diff --git a/.Source/GTweak/Core/ViewModel/DataSystemVM.cs b/.Source/GTweak/Core/ViewModel/DataSystemVM.cs
index f1535162..ee3f30b4 100644
--- a/.Source/GTweak/Core/ViewModel/DataSystemVM.cs
+++ b/.Source/GTweak/Core/ViewModel/DataSystemVM.cs
@@ -68,11 +68,12 @@ namespace GTweak.Core.ViewModel
CreateModelCollection("Windows", SystemDiagnostics.HardwareData.OperatingSystem),
CreateModelCollection("Processes", new MonitoringSystem().GetNumberRunningProcesses),
CreateModelCollection("Bios", SystemDiagnostics.HardwareData.Bios, "no_device_information_systemInformatin"),
- CreateModelCollection("Mode", SystemDiagnostics.HardwareData.BiosMode, "no_device_information_systemInformatin"),
+ CreateModelCollection("Mode", SystemDiagnostics.HardwareData.BiosMode, "unknown_information_systemInformatin"),
CreateModelCollection("Motherboard", SystemDiagnostics.HardwareData.Motherboard, "no_device_information_systemInformatin"),
CreateModelCollection("Processor", SystemDiagnostics.HardwareData.Processor, "no_device_information_systemInformatin"),
CreateModelCollection("Graphics", SystemDiagnostics.HardwareData.Graphics, "driver_not_installed_systemInformatin"),
CreateModelCollection("Memory", SystemDiagnostics.HardwareData.Memory, "no_device_information_systemInformatin"),
+ CreateModelCollection("Type", SystemDiagnostics.HardwareData.MemoryType, "unknown_information_systemInformatin"),
CreateModelCollection("Storage", SystemDiagnostics.HardwareData.Storage, "no_device_information_systemInformatin"),
CreateModelCollection("Audio", SystemDiagnostics.HardwareData.AudioDevice, "driver_not_installed_systemInformatin"),
CreateModelCollection("Network", SystemDiagnostics.HardwareData.NetworkAdapter, "driver_not_installed_systemInformatin"),
diff --git a/.Source/GTweak/Languages/en/Localize.xaml b/.Source/GTweak/Languages/en/Localize.xaml
index 4044c22b..6b3d0a2f 100644
--- a/.Source/GTweak/Languages/en/Localize.xaml
+++ b/.Source/GTweak/Languages/en/Localize.xaml
@@ -426,6 +426,7 @@
<v:String x:Key="title_cpu_systemInformation">Processor:</v:String>
<v:String x:Key="title_gpu_systemInformation">Graphics:</v:String>
<v:String x:Key="title_ram_systemInformation">Memory:</v:String>
+ <v:String x:Key="title_mtype_systemInformation">Memory Type:</v:String>
<v:String x:Key="title_disk_systemInformation">Storage devices:</v:String>
<v:String x:Key="title_sound_systemInformation">Playback devices:</v:String>
<v:String x:Key="title_netadapter_systemInformation">Network adapters:</v:String>
@@ -436,6 +437,7 @@
<v:String x:Key="text_copy_systemInformatin">Copied!</v:String>
<v:String x:Key="driver_not_installed_systemInformatin">You don't have a driver installed</v:String>
<v:String x:Key="no_device_information_systemInformatin">No device information was found</v:String>
+ <v:String x:Key="unknown_information_systemInformatin">Not detected</v:String>
<!--#endregion-->
<!--#region More Page -->
diff --git a/.Source/GTweak/Languages/fr/Localize.xaml b/.Source/GTweak/Languages/fr/Localize.xaml
index 038ae94f..ecf88367 100644
--- a/.Source/GTweak/Languages/fr/Localize.xaml
+++ b/.Source/GTweak/Languages/fr/Localize.xaml
@@ -429,6 +429,7 @@
<v:String x:Key="title_cpu_systemInformation">Processeur :</v:String>
<v:String x:Key="title_gpu_systemInformation">Carte graphique :</v:String>
<v:String x:Key="title_ram_systemInformation">Mémoire :</v:String>
+ <v:String x:Key="title_mtype_systemInformation">Memory Type:</v:String>
<v:String x:Key="title_disk_systemInformation">Périphériques de stockage :</v:String>
<v:String x:Key="title_sound_systemInformation">Périphériques audio :</v:String>
<v:String x:Key="title_netadapter_systemInformation">Adaptateurs réseau :</v:String>
@@ -439,6 +440,7 @@
<v:String x:Key="text_copy_systemInformatin">Copié !</v:String>
<v:String x:Key="driver_not_installed_systemInformatin">Pilote non installé</v:String>
<v:String x:Key="no_device_information_systemInformatin">Aucune information sur le périphérique trouvée</v:String>
+ <v:String x:Key="unknown_information_systemInformatin">Not detected</v:String>
<!--#endregion-->
<!--#region More Page -->
diff --git a/.Source/GTweak/Languages/it/Localize.xaml b/.Source/GTweak/Languages/it/Localize.xaml
index ec0d0f84..bd5bbc77 100644
--- a/.Source/GTweak/Languages/it/Localize.xaml
+++ b/.Source/GTweak/Languages/it/Localize.xaml
@@ -427,6 +427,7 @@
<v:String x:Key="title_cpu_systemInformation">Processore:</v:String>
<v:String x:Key="title_gpu_systemInformation">Grafica:</v:String>
<v:String x:Key="title_ram_systemInformation">Memoria:</v:String>
+ <v:String x:Key="title_mtype_systemInformation">Memory Type:</v:String>
<v:String x:Key="title_disk_systemInformation">Dispositivi di archiviazione:</v:String>
<v:String x:Key="title_sound_systemInformation">Dispositivi di riproduzione:</v:String>
<v:String x:Key="title_netadapter_systemInformation">Schede di rete:</v:String>
@@ -437,6 +438,7 @@
<v:String x:Key="text_copy_systemInformatin">Copiato!</v:String>
<v:String x:Key="driver_not_installed_systemInformatin">Driver non installato</v:String>
<v:String x:Key="no_device_information_systemInformatin">Nessuna informazione sul dispositivo trovata</v:String>
+ <v:String x:Key="unknown_information_systemInformatin">Not detected</v:String>
<!--#endregion-->
<!--#region More Page -->
diff --git a/.Source/GTweak/Languages/ko/Localize.xaml b/.Source/GTweak/Languages/ko/Localize.xaml
index e1dcf91c..6842eee7 100644
--- a/.Source/GTweak/Languages/ko/Localize.xaml
+++ b/.Source/GTweak/Languages/ko/Localize.xaml
@@ -426,6 +426,7 @@
<v:String x:Key="title_cpu_systemInformation">프로세스:</v:String>
<v:String x:Key="title_gpu_systemInformation">그래픽:</v:String>
<v:String x:Key="title_ram_systemInformation">메모리:</v:String>
+ <v:String x:Key="title_mtype_systemInformation">Memory Type:</v:String>
<v:String x:Key="title_disk_systemInformation">저장소 장치:</v:String>
<v:String x:Key="title_sound_systemInformation">재생 장치:</v:String>
<v:String x:Key="title_netadapter_systemInformation">네트워크 어댑터:</v:String>
@@ -436,6 +437,7 @@
<v:String x:Key="text_copy_systemInformatin">복사 완료!</v:String>
<v:String x:Key="driver_not_installed_systemInformatin">드라이버가 설치되어 있지 않습니다</v:String>
<v:String x:Key="no_device_information_systemInformatin">장치 정보를 찾을 수 없습니다</v:String>
+ <v:String x:Key="unknown_information_systemInformatin">Not detected</v:String>
<!--#endregion-->
<!--#region More Page -->
diff --git a/.Source/GTweak/Languages/ru/Localize.xaml b/.Source/GTweak/Languages/ru/Localize.xaml
index cac6457d..4874909e 100644
--- a/.Source/GTweak/Languages/ru/Localize.xaml
+++ b/.Source/GTweak/Languages/ru/Localize.xaml
@@ -426,6 +426,7 @@
<v:String x:Key="title_cpu_systemInformation">Процессор:</v:String>
<v:String x:Key="title_gpu_systemInformation">Видеокарта:</v:String>
<v:String x:Key="title_ram_systemInformation">Оперативная память:</v:String>
+ <v:String x:Key="title_mtype_systemInformation">Тип памяти:</v:String>
<v:String x:Key="title_disk_systemInformation">Устройства хранения данных:</v:String>
<v:String x:Key="title_sound_systemInformation">Устройства воспроизведения:</v:String>
<v:String x:Key="title_netadapter_systemInformation">Сетевые адаптеры:</v:String>
@@ -436,6 +437,7 @@
<v:String x:Key="text_copy_systemInformatin">Скопировано!</v:String>
<v:String x:Key="driver_not_installed_systemInformatin">У вас не установлен драйвер</v:String>
<v:String x:Key="no_device_information_systemInformatin">Сведения об устройстве не найдено</v:String>
+ <v:String x:Key="unknown_information_systemInformatin">Не определен</v:String>
<!--#endregion-->
<!--#region More Page -->
diff --git a/.Source/GTweak/Languages/uk/Localize.xaml b/.Source/GTweak/Languages/uk/Localize.xaml
index 6a7528c4..6193dc3f 100644
--- a/.Source/GTweak/Languages/uk/Localize.xaml
+++ b/.Source/GTweak/Languages/uk/Localize.xaml
@@ -426,6 +426,7 @@
<v:String x:Key="title_cpu_systemInformation">Процесор:</v:String>
<v:String x:Key="title_gpu_systemInformation">Відеокарта:</v:String>
<v:String x:Key="title_ram_systemInformation">Оперативна пам’ять:</v:String>
+ <v:String x:Key="title_mtype_systemInformation">Memory Type:</v:String>
<v:String x:Key="title_disk_systemInformation">Пристрої зберігання даних:</v:String>
<v:String x:Key="title_sound_systemInformation">Пристрої відтворення:</v:String>
<v:String x:Key="title_netadapter_systemInformation">Мережеві адаптери:</v:String>
@@ -436,6 +437,7 @@
<v:String x:Key="text_copy_systemInformatin">Скопійовано!</v:String>
<v:String x:Key="driver_not_installed_systemInformatin">У вас не встановлено драйвер</v:String>
<v:String x:Key="no_device_information_systemInformatin">Не знайдено інформації про пристрій</v:String>
+ <v:String x:Key="unknown_information_systemInformatin">Not detected</v:String>
<!--#endregion-->
<!--#region More Page -->
diff --git a/.Source/GTweak/Properties/AssemblyInfo.cs b/.Source/GTweak/Properties/AssemblyInfo.cs
index 9d2828ec..ba55b0b7 100644
--- a/.Source/GTweak/Properties/AssemblyInfo.cs
+++ b/.Source/GTweak/Properties/AssemblyInfo.cs
@@ -7,9 +7,9 @@ using System.Windows;
[assembly: AssemblyProduct("GTweak")]
[assembly: AssemblyCopyright("© 2024-2025 Greedeks")]
[assembly: AssemblyTrademark("Greedeks")]
-[assembly: AssemblyInformationalVersion("Build: 5.2.7")]
-[assembly: AssemblyVersion("5.2.52.17")]
-[assembly: AssemblyFileVersion("5.2.52.17")]
+[assembly: AssemblyInformationalVersion("Build: 5.2.8")]
+[assembly: AssemblyVersion("5.2.40.606")]
+[assembly: AssemblyFileVersion("5.2.40.606")]
[assembly: ComVisible(false)]
diff --git a/.Source/GTweak/Properties/AssemblyInfo.tt b/.Source/GTweak/Properties/AssemblyInfo.tt
index 03cf9847..275105c1 100644
--- a/.Source/GTweak/Properties/AssemblyInfo.tt
+++ b/.Source/GTweak/Properties/AssemblyInfo.tt
@@ -20,7 +20,7 @@ using System.Windows;
ResourceDictionaryLocation.SourceAssembly
)]
<#+
- private const string majorVersion = "Build: 5.2.7";
+ private const string majorVersion = "Build: 5.2.8";
private string GenerateVersion()
{
diff --git a/.Source/GTweak/Utilities/Configuration/SystemDiagnostics.cs b/.Source/GTweak/Utilities/Configuration/SystemDiagnostics.cs
index 90089899..64faa52c 100644
--- a/.Source/GTweak/Utilities/Configuration/SystemDiagnostics.cs
+++ b/.Source/GTweak/Utilities/Configuration/SystemDiagnostics.cs
@@ -5,6 +5,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
@@ -12,6 +13,7 @@ using System.Management;
using System.Net;
using System.Net.Http;
using System.Security.Principal;
+using System.ServiceProcess;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
@@ -19,7 +21,6 @@ using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
-
namespace GTweak.Utilities.Configuration
{
internal sealed class SystemDiagnostics
@@ -55,6 +56,7 @@ namespace GTweak.Utilities.Configuration
internal static string Processor { get; set; } = string.Empty;
internal static string Graphics { get; set; } = string.Empty;
internal static string Memory { get; set; } = string.Empty;
+ internal static string MemoryType { get; set; } = string.Empty;
internal static string Storage { get; set; } = string.Empty;
internal static string AudioDevice { get; set; } = string.Empty;
internal static string NetworkAdapter { get; set; } = string.Empty;
@@ -262,21 +264,26 @@ namespace GTweak.Utilities.Configuration
/// </summary>
private void GetMemoryInfo()
{
- foreach (var managementObj in new ManagementObjectSearcher(@"root\cimv2", "select Manufacturer, Capacity, ConfiguredClockSpeed, Speed, SMBIOSMemoryType from Win32_PhysicalMemory", new EnumerationOptions { ReturnImmediately = true }).Get())
+ foreach (var managementObj in new ManagementObjectSearcher(@"root\cimv2", "select Manufacturer, Name, Caption, Description, Tag, Capacity, ConfiguredClockSpeed, Speed, SMBIOSMemoryType from Win32_PhysicalMemory", new EnumerationOptions { ReturnImmediately = true }).Get())
{
string speedData = new[] { "ConfiguredClockSpeed", "Speed" }.Select(prop => managementObj[prop] != null ? Convert.ToString(managementObj[prop]) : null).FirstOrDefault(info => !string.IsNullOrEmpty(info) && info != "0");
- string manufacturer = (string)managementObj["Manufacturer"];
+ string data = new[] { "Manufacturer", "Name", "Caption", "Description", "Tag" }.Select(prop => managementObj[prop] as string).FirstOrDefault(value => !string.IsNullOrWhiteSpace(value) || !value.Equals("Unknown", StringComparison.OrdinalIgnoreCase)) ?? string.Empty;
string memoryType = (uint)managementObj["SMBIOSMemoryType"] switch
{
24 => "DDR3",
26 => "DDR4",
29 => "LPDDR3",
30 => "LPDDR4",
+ 31 => "LPDDR4X",
34 => "DDR5",
35 => "LPDDR5",
+ 36 => "LPDDR5X",
_ => string.Empty
};
- HardwareData.Memory += $"{(manufacturer.Equals("Unknown", StringComparison.OrdinalIgnoreCase) || string.IsNullOrEmpty(manufacturer) ? string.Concat(memoryType, ", ") : string.Concat(manufacturer, ", "))}{SizeCalculationHelper((ulong)managementObj["Capacity"])}{(string.IsNullOrEmpty(speedData) ? "" : $", {speedData}MHz")}\n";
+
+ string[] vmKeywords = new[] { "Virtual", "VMware", "Hyper-V", "KVM", "QEMU", "Xen", "Parallels", "VBox", "VirtualBox", "Cloud", "Emulated", "Proxmox", "OpenStack", "Nutanix", "Oracle VM", "Azure", "AWS", "GCP", "vStack", "zVirt", "HCI", "VHD", "OVF", "OVA"};
+ HardwareData.MemoryType = string.IsNullOrEmpty(memoryType) && vmKeywords.Any(keyword => data.IndexOf(keyword, StringComparison.OrdinalIgnoreCase) >= 0) ? "Virtual" : memoryType;
+ HardwareData.Memory += $"{string.Concat(data, ", ")}{SizeCalculationHelper((ulong)managementObj["Capacity"])}{(string.IsNullOrEmpty(speedData) ? "" : $", {speedData}MHz")}\n";
}
HardwareData.Memory = HardwareData.Memory.TrimEnd('\n', '\r');
}
@@ -412,6 +419,39 @@ namespace GTweak.Utilities.Configuration
return $"{Math.Round(totalSize / (1024.0 * 1024.0), 2):G} TB";
}
+ private static bool IsVirtualMachine()
+ {
+
+ byte score = 0;
+ string[] vmServices = {"vmtools", "vmware tools", "vmtoolsd", "vm3dservice", "wmtools", "tpvcgateway", "tpautoconnsvc", "vpcmap", "wmsrvc",
+ "vmusrvc", "vboxservice", "hvservice", "vmcompute", "hvhost", "prl_cc", "prl_tools", "xen", "xensvc", "qemu-ga", "virtio", "tpautoconnsvc", "tpvcgateway"};
+
+ if (ServiceController.GetServices().Any(s => vmServices.Any(vs => s.ServiceName.IndexOf(vs, StringComparison.OrdinalIgnoreCase) >= 0)))
+ score++;
+
+ if (Process.GetProcesses().Any(p => new[] { "vmtoolsd", "vboxservice", "qemu-ga" }.Any(vp => p.ProcessName.Equals(vp, StringComparison.OrdinalIgnoreCase))))
+ score++;
+
+ foreach (var keyPath in new[] { @"SOFTWARE\VMware, Inc.", @"SOFTWARE\Oracle\VirtualBox", @"SOFTWARE\Microsoft\Virtual Machine" })
+ if (RegistryHelp.KeyExists(Registry.LocalMachine, keyPath))
+ score++;
+
+ string[] vmDevices = { "VMware", "VMWAREVMWARE", "VBOXVBOXVBOX", "VirtualBox", "PRL HYPERV", "Virtual CPU", "Hypervisor", "KVM", "QEMU", "Virtual RAM", "Virtual", "VMware SVGA", "VirtualBox Graphics", "Microsoft Corporation", "Microsoft Hyper-V Video" };
+
+ string[] hardwareFields = { HardwareData.Bios, HardwareData.Processor, HardwareData.Graphics, HardwareData.Memory };
+
+ foreach (string field in hardwareFields)
+ {
+ foreach (string indicator in vmDevices)
+ {
+ if (field.IndexOf(indicator, StringComparison.OrdinalIgnoreCase) >= 0)
+ score++;
+ }
+ }
+
+ return score > 2;
+ }
+
private string GetNetworkAdapters()
{
StringBuilder result = new StringBuilder();
diff --git a/.Source/GTweak/View/DataSystemView.xaml b/.Source/GTweak/View/DataSystemView.xaml
index ddfb478f..9492d8cf 100644
--- a/.Source/GTweak/View/DataSystemView.xaml
+++ b/.Source/GTweak/View/DataSystemView.xaml
@@ -157,6 +157,10 @@
<StackPanel Orientation="Vertical" Margin="60,20,0,0">
<TextBlock Text="{DynamicResource title_ram_systemInformation}" Style="{StaticResource Text}" HorizontalAlignment="Left" Foreground="{StaticResource Color_Accent}" Height="Auto" Width="Auto"/>
<TextBlock Text="{Binding [Memory].Data}" Style="{StaticResource Text}" HorizontalAlignment="Left" Margin="1,0,0,0" Foreground="{StaticResource Color_Highlighted}" Height="Auto" Width="Auto" PreviewMouseLeftButtonDown="TextComputerData_PreviewMouseDown" Cursor="Hand"/>
+ <TextBlock Style="{StaticResource Text}" HorizontalAlignment="Left" Margin="1,0,0,0" Foreground="{StaticResource Color_Highlighted}" Height="Auto" Width="Auto">
+ <Run Text="{DynamicResource title_mtype_systemInformation}" Foreground="{StaticResource Color_Accent}"/>
+ <Run Text="{Binding [Type].Data}" PreviewMouseDown="TextComputerData_PreviewMouseDown" Cursor="Hand"/>
+ </TextBlock>
</StackPanel>
</Grid>
</Grid>