1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
char* WS_Name = WMIQuery("Computer Name", "Win32_ComputerSystem", "Name", ""); // Computer Name
char* WS_Domain = WMIQuery("Domain Name", "Win32_ComputerSystem", "Domain", ""); // Domain Name
char* WS_Manufacturer = WMIQuery("Computer Manufacturer", "Win32_ComputerSystem", "Manufacturer", ""); // Computer Manufacturer
char* WS_Model = WMIQuery("Computer Model Number", "Win32_ComputerSystem", "Model", ""); // Computer Model Number
char* WS_OS = WMIQuery("OS Name", "Win32_OperatingSystem", "Caption", ""); // OS Name
char* WS_Arch = WMIQuery("OS Architecture", "Win32_OperatingSystem", "OSArchitecture", ""); // Architecture
char* WS_HDDSize = WMIQuery("HDD Capacity", "Win32_LogicalDisk", "Size", " where drivetype = 3"); // HDD Capacity
char* WS_HDDFree = WMIQuery("HDD Free Space", "Win32_LogicalDisk", "FreeSpace", " where drivetype = 3"); // HDD Free Space
char* WS_RAM0 = WMIQuery("Ram 0 Size", "Win32_PhysicalMemory", "Capacity", " where tag = 'Physical Memory 0'"); // Ram 0
char* WS_RAM1 = WMIQuery("Ram 1 Size", "Win32_PhysicalMemory", "Capacity", " where tag = 'Physical Memory 1'"); // Ram 1
char* WS_RAM2 = WMIQuery("Ram 2 Size", "Win32_PhysicalMemory", "Capacity", " where tag = 'Physical Memory 2'"); // Ram 2
char* WS_RAM3 = WMIQuery("Ram 3 Size", "Win32_PhysicalMemory", "Capacity", " where tag = 'Physical Memory 3'"); // Ram 3
char* WS_User = WMIQuery("User Name", "Win32_ComputerSystem", "UserName", ""); // User logged in at time, if...
// Display Variables to confirm
printf("Display ALL Results...\n");
printf("Machine Name: %ls\n", WS_Name);
printf("Computer Name: %ls\n", WS_Domain); // Domain Name
printf("Computer Manufacturer: %ls\n", WS_Manufacturer); // Computer Manufacturer
printf("Computer Model Number: %ls\n", WS_Model); // Computer Model Number
printf("OS Name: %ls\n", WS_OS); // OS Name
printf("OS Architecture: %ls\n", WS_Arch); // Architecture
printf("HDD Capacity: %ls\n", WS_HDDSize); // HDD Capacity
printf("HDD Free Space: %ls\n", WS_HDDFree); // HDD Free Space
printf("RAM #0: %ls\n", WS_RAM0); // Ram 0/1/2/3
printf("RAM #1: %ls\n", WS_RAM1); // Ram 0/1/2/3
printf("RAM #2: %ls\n", WS_RAM2); // Ram 0/1/2/3
printf("RAM #3: %ls\n", WS_RAM3); // Ram 0/1/2/3
printf("User logged in: %ls\n", WS_User); // User logged in at time, if...
|