[SYSTEMINFO]
authorRafal Harabien <rafalh@reactos.org>
Fri, 1 Apr 2011 18:58:12 +0000 (18:58 +0000)
committerRafal Harabien <rafalh@reactos.org>
Fri, 1 Apr 2011 18:58:12 +0000 (18:58 +0000)
Don't translate System Type
Don't mix TCHARs and chars
Fix Time Zone for not English systems
Use proper registry key for Install Date
Format dates using system settings
Format numbers

svn path=/trunk/; revision=51221

rosapps/applications/sysutils/systeminfo/lang/de-DE.rc
rosapps/applications/sysutils/systeminfo/lang/en-US.rc
rosapps/applications/sysutils/systeminfo/lang/es-ES.rc
rosapps/applications/sysutils/systeminfo/lang/fr-FR.rc
rosapps/applications/sysutils/systeminfo/lang/no-NO.rc
rosapps/applications/sysutils/systeminfo/lang/pl-PL.rc
rosapps/applications/sysutils/systeminfo/lang/sk-SK.rc
rosapps/applications/sysutils/systeminfo/lang/uk-UA.rc
rosapps/applications/sysutils/systeminfo/resource.h
rosapps/applications/sysutils/systeminfo/systeminfo.c

index 18efe35..f161f72 100644 (file)
@@ -38,15 +38,11 @@ IDS_OS_BUILD_TYPE,           "OS Build Typ:              %s\n"
 IDS_REG_OWNER,               "Registrierter Benutzer:    %s\n"
 IDS_REG_ORG,                 "Registrierte Organisation: %s\n"
 IDS_PRODUCT_ID,              "Produkt ID:                %s\n"
-IDS_INST_DATE,               "Installationsdatum:        %s, "
-IDS_INST_TIME,               "%s\n"
+IDS_INST_DATE,               "Installationsdatum:        %s\n"
 IDS_UP_TIME,                 "System Up Time:            %u Days, %u Hours, %u, Minutes, %u Seconds\n"
 IDS_SYS_MANUFACTURER,        "System Manufacturer:       %s\n"
 IDS_SYS_MODEL,               "System Model:              %s\n"
-IDS_SYS_TYPE_UNKNOWN,        "Systemtyp:                 Unbekannt\n"
-IDS_SYS_TYPE_X86,            "Systemtyp:                 X86-based PC\n"
-IDS_SYS_TYPE_IA64,           "Systemtyp:                 IA64-based PC\n"
-IDS_SYS_TYPE_AMD64,          "Systemtyp:                 AMD64-based PC\n"
+IDS_SYS_TYPE,                "Systemtyp:                 %s\n"
 IDS_PROCESSORS,              "Prozessor(en):             %u Prozessor(en) Installiert.\n"
 IDS_BIOS_DATE,               "BIOS Datum:                %s\n"
 IDS_BIOS_VERSION,            "BIOS Version:              %s\n"
@@ -55,13 +51,13 @@ IDS_SYS_DIR,                 "System Verzeichnis:        %s\n"
 IDS_BOOT_DEV,                "Startgerät:                %s\n"
 IDS_SYS_LOCALE,              "Systemgebietsschema:       %s\n"
 IDS_INPUT_LOCALE,            "Eingabegebietsschema:      %s\n"
-IDS_TOTAL_PHYS_MEM,          "Gesamter Physikalischer Speicher:    %ld MB (%ld KB)\n"
-IDS_AVAIL_PHISICAL_MEM,      "Verfügbarer Physikalischer Speicher: %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_MAX,            "Auslagerungsdatei: Max Größe:        %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_AVAIL,          "Auslagerungsdatei: Verfügbar:        %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_INUSE,          "Auslagerungsdatei: In Verwendung:    %ld MB (%ld KB)\n"
-IDS_PAGEFILE_LOC,            "Auslagerungsdateipfad(e)  %s"
-IDS_TIME_ZONE,               "Zeitzone:                 %s\n"
+IDS_TIME_ZONE,               "Zeitzone:                  %s\n"
+IDS_TOTAL_PHYS_MEM,          "Gesamter Physikalischer Speicher:    %s MB\n"
+IDS_AVAIL_PHISICAL_MEM,      "Verfügbarer Physikalischer Speicher: %s MB\n"
+IDS_VIRT_MEM_MAX,            "Auslagerungsdatei: Max Größe:        %s MB\n"
+IDS_VIRT_MEM_AVAIL,          "Auslagerungsdatei: Verfügbar:        %s MB\n"
+IDS_VIRT_MEM_INUSE,          "Auslagerungsdatei: In Verwendung:    %s MB\n"
+IDS_PAGEFILE_LOC,            "Auslagerungsdateipfad(e): %s"
 IDS_DOMINE,                  "Domain:                   %s\n"
 IDS_NETWORK_CARDS,           "Netzwerkkarte(n)          %u Installiert.\n"
 
index 6c2053f..d7731b6 100644 (file)
@@ -36,15 +36,11 @@ IDS_OS_BUILD_TYPE,           "OS Build Type:           %s\n"
 IDS_REG_OWNER,               "Registered Owner:        %s\n"
 IDS_REG_ORG,                 "Registered Organization: %s\n"
 IDS_PRODUCT_ID,              "Product ID:              %s\n"
-IDS_INST_DATE,               "Install Date:            %s, "
-IDS_INST_TIME,               "%s\n"
+IDS_INST_DATE,               "Install Date:            %s\n"
 IDS_UP_TIME,                 "System Up Time:          %u Days, %u Hours, %u, Minutes, %u Seconds\n"
 IDS_SYS_MANUFACTURER,        "System Manufacturer:     %s\n"
 IDS_SYS_MODEL,               "System Model:            %s\n"
-IDS_SYS_TYPE_UNKNOWN,        "System type:             Unknown\n"
-IDS_SYS_TYPE_X86,            "System type:             X86-based PC\n"
-IDS_SYS_TYPE_IA64,           "System type:             IA64-based PC\n"
-IDS_SYS_TYPE_AMD64,          "System type:             AMD64-based PC\n"
+IDS_SYS_TYPE,                "System type:             %s\n"
 IDS_PROCESSORS,              "Processor(s):            %u Processor(s) Installed.\n"
 IDS_BIOS_DATE,               "BIOS Date:               %s\n"
 IDS_BIOS_VERSION,            "BIOS Version:            %s\n"
@@ -53,13 +49,13 @@ IDS_SYS_DIR,                 "System Directory:        %s\n"
 IDS_BOOT_DEV,                "Boot Device:             %s\n"
 IDS_SYS_LOCALE,              "System Locale:           %s\n"
 IDS_INPUT_LOCALE,            "Input Locale:            %s\n"
-IDS_TOTAL_PHYS_MEM,          "Total Physical Memory:     %ld MB (%ld KB)\n"
-IDS_AVAIL_PHISICAL_MEM,      "Available Physical Memory: %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_MAX,            "Virtual Memory: Max Size:  %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_AVAIL,          "Virtual Memory: Available: %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_INUSE,          "Virtual Memory: In Use:    %ld MB (%ld KB)\n"
-IDS_PAGEFILE_LOC,            "Page File Location(s)      %s\n"
-IDS_TIME_ZONE,               "Time zone:                 %s\n"
+IDS_TIME_ZONE,               "Time zone:               %s\n"
+IDS_TOTAL_PHYS_MEM,          "Total Physical Memory:     %s MB\n"
+IDS_AVAIL_PHISICAL_MEM,      "Available Physical Memory: %s MB\n"
+IDS_VIRT_MEM_MAX,            "Virtual Memory: Max Size:  %s MB\n"
+IDS_VIRT_MEM_AVAIL,          "Virtual Memory: Available: %s MB\n"
+IDS_VIRT_MEM_INUSE,          "Virtual Memory: In Use:    %s MB\n"
+IDS_PAGEFILE_LOC,            "Page File Location(s):     %s\n"
 IDS_DOMINE,                  "Domain:                    %s\n"
 IDS_NETWORK_CARDS,           "Network Card(s)            %u Installed.\n"
 
index 21491ba..423c67d 100644 (file)
@@ -41,15 +41,11 @@ IDS_OS_BUILD_TYPE,           "Tipo Compilaci
 IDS_REG_OWNER,               "Propietario:               %s\n"
 IDS_REG_ORG,                 "Organización:              %s\n"
 IDS_PRODUCT_ID,              "Identificador de Producto  %s\n"
-IDS_INST_DATE,               "Fecha de Instalación:      %s, "
-IDS_INST_TIME,               "%s\n"
+IDS_INST_DATE,               "Fecha de Instalación:      %s\n"
 IDS_UP_TIME,                 "System Up Time:            %u Days, %u Hours, %u, Minutes, %u Seconds\n"
 IDS_SYS_MANUFACTURER,        "System Manufacturer:       %s\n"
 IDS_SYS_MODEL,               "System Model:              %s\n"
-IDS_SYS_TYPE_UNKNOWN,        "Tipo de sistema:             Desconocido\n"
-IDS_SYS_TYPE_X86,            "Tipo de sistema:             PC basado en X86\n"
-IDS_SYS_TYPE_IA64,           "Tipo de sistema:             PC basado en IA64\n"
-IDS_SYS_TYPE_AMD64,          "Tipo de sistema:             PC basado en AMD64\n"
+IDS_SYS_TYPE,                "Tipo de sistema:           %s\n"
 IDS_PROCESSORS,              "Procesador(es):              %u Procesador(es) Instalados.\n"
 IDS_BIOS_DATE,               "Fecha BIOS:                  %s\n"
 IDS_BIOS_VERSION,            "Versión BIOS:                %s\n"
@@ -58,13 +54,13 @@ IDS_SYS_DIR,                 "Directorio del Sistema:      %s\n"
 IDS_BOOT_DEV,                "Dispositivo de Inicio:       %s\n"
 IDS_SYS_LOCALE,              "Idioma del sistema:          %s\n"
 IDS_INPUT_LOCALE,            "Idioma de entrada:           %s\n"
-IDS_TOTAL_PHYS_MEM,          "Memoria Física Total:        %ld MB (%ld KB)\n"
-IDS_AVAIL_PHISICAL_MEM,      "Memoria Física Disponible:   %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_MAX,            "Memoria Virtual: Tamaño Máx: %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_AVAIL,          "Memoria Virtual: Disponible: %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_INUSE,          "Memoria Virtual: En Uso:     %ld MB (%ld KB)\n"
-IDS_PAGEFILE_LOC,            "Ruta(s) Archivo Paginación   %s\n"
 IDS_TIME_ZONE,               "Zona horario:                %s\n"
+IDS_TOTAL_PHYS_MEM,          "Memoria Física Total:        %s MB\n"
+IDS_AVAIL_PHISICAL_MEM,      "Memoria Física Disponible:   %s MB\n"
+IDS_VIRT_MEM_MAX,            "Memoria Virtual: Tamaño Máx: %s MB\n"
+IDS_VIRT_MEM_AVAIL,          "Memoria Virtual: Disponible: %s MB\n"
+IDS_VIRT_MEM_INUSE,          "Memoria Virtual: En Uso:     %s MB\n"
+IDS_PAGEFILE_LOC,            "Ruta(s) Archivo Paginación:  %s\n"
 IDS_DOMINE,                  "Dominio:                     %s\n"
 IDS_NETWORK_CARDS,           "Tarjeta(s) de Red            %u No Instalada.\n"
 
index d99900e..4d9c9a4 100644 (file)
@@ -36,15 +36,11 @@ IDS_OS_BUILD_TYPE,           "Type de compilation du syst
 IDS_REG_OWNER,               "Propriétaire enregistré :        %s\n"\r
 IDS_REG_ORG,                 "Organisation enregistrée :       %s\n"\r
 IDS_PRODUCT_ID,              "ID du produit :            %s\n"\r
-IDS_INST_DATE,               "Date d'installation :      %s, "\r
-IDS_INST_TIME,               "%s\n"\r
+IDS_INST_DATE,               "Date d'installation :      %s\n"\r
 IDS_UP_TIME,                 "System Up Time:            %u Days, %u Hours, %u, Minutes, %u Seconds\n"\r
 IDS_SYS_MANUFACTURER,        "System Manufacturer:       %s\n"\r
 IDS_SYS_MODEL,               "System Model:              %s\n"\r
-IDS_SYS_TYPE_UNKNOWN,        "Type du système :            Inconnu\n"\r
-IDS_SYS_TYPE_X86,            "Type du système :            Basé sur un PC X86\n"\r
-IDS_SYS_TYPE_IA64,           "Type du système :            Basé sur un PC IA64\n"\r
-IDS_SYS_TYPE_AMD64,          "Type du système :            Basé sur un PC AMD64\n"\r
+IDS_SYS_TYPE,                "Type du système :          %s\n"\r
 IDS_PROCESSORS,              "Processeur(s) :              %u Processeur(s) installé(s).\n"\r
 IDS_BIOS_DATE,               "Date du BIOS :               %s\n"\r
 IDS_BIOS_VERSION,            "Version du BIOS :            %s\n"\r
@@ -53,13 +49,13 @@ IDS_SYS_DIR,                 "R
 IDS_BOOT_DEV,                "Périphérique de démarrage :     %s\n"\r
 IDS_SYS_LOCALE,              "Paramètre régional du système : %s\n"\r
 IDS_INPUT_LOCALE,            "Paramètre régional de saisie :  %s\n"\r
-IDS_TOTAL_PHYS_MEM,          "Mémoire physique totale :       %ld Mo (%ld Ko)\n"\r
-IDS_AVAIL_PHISICAL_MEM,      "Mémoire physique disponible :   %ld Mo (%ld Ko)\n"\r
-IDS_VIRT_MEM_MAX,            "Mémoire virtuelle: Taille max : %ld Mo (%ld Ko)\n"\r
-IDS_VIRT_MEM_AVAIL,          "Mémoire virtuelle: Disponible : %ld Mo (%ld Ko)\n"\r
-IDS_VIRT_MEM_INUSE,          "Mémoire virtuelle: Utilisée :   %ld Mo (%ld Ko)\n"\r
-IDS_PAGEFILE_LOC,            "Emplacement(s) des fichiers d'échange  %s"\r
 IDS_TIME_ZONE,               "Fuseau horaire :                %s\n"\r
+IDS_TOTAL_PHYS_MEM,          "Mémoire physique totale :       %s Mo\n"\r
+IDS_AVAIL_PHISICAL_MEM,      "Mémoire physique disponible :   %s Mo\n"\r
+IDS_VIRT_MEM_MAX,            "Mémoire virtuelle: Taille max : %s Mo\n"\r
+IDS_VIRT_MEM_AVAIL,          "Mémoire virtuelle: Disponible : %s Mo\n"\r
+IDS_VIRT_MEM_INUSE,          "Mémoire virtuelle: Utilisée :   %s Mo\n"\r
+IDS_PAGEFILE_LOC,            "Emplacement(s) des fichiers d'échange : %s"\r
 IDS_DOMINE,                  "Domaine :                       %s\n"\r
 IDS_NETWORK_CARDS,           "Carte(s) réseau                 %u installée(s).\n"\r
 \r
index 0beda9a..e4e4966 100644 (file)
@@ -36,15 +36,11 @@ IDS_OS_BUILD_TYPE,           "OS bygg type:          %s\n"
 IDS_REG_OWNER,               "Registert eier:        %s\n"
 IDS_REG_ORG,                 "Registerert organisasjon: %s\n"
 IDS_PRODUCT_ID,              "Produkt ID:            %s\n"
-IDS_INST_DATE,               "Installert dato:       %s, "
-IDS_INST_TIME,               "%s\n"
+IDS_INST_DATE,               "Installert dato:       %s\n"
 IDS_UP_TIME,                 "System Up Time:        %u Days, %u Hours, %u, Minutes, %u Seconds\n"
 IDS_SYS_MANUFACTURER,        "System Manufacturer:   %s\n"
 IDS_SYS_MODEL,               "System Model:          %s\n"
-IDS_SYS_TYPE_UNKNOWN,        "Systemtype:            Ukjent\n"
-IDS_SYS_TYPE_X86,            "Systemtype:            X86-basert PC\n"
-IDS_SYS_TYPE_IA64,           "Systemtype:            IA64-basert PC\n"
-IDS_SYS_TYPE_AMD64,          "Systemtype:            AMD64-basert PC\n"
+IDS_SYS_TYPE,                "Systemtype:            %s\n"
 IDS_PROCESSORS,              "Prosessor(er):         %u Prosessor(er) installert.\n"
 IDS_BIOS_DATE,               "BIOS dato:             %s\n"
 IDS_BIOS_VERSION,            "BIOS Versjon:          %s\n"
@@ -53,13 +49,13 @@ IDS_SYS_DIR,                 "System mappe:          %s\n"
 IDS_BOOT_DEV,                "Oppstartsenhet:        %s\n"
 IDS_SYS_LOCALE,              "System lokal:          %s\n"
 IDS_INPUT_LOCALE,            "Input lokal:           %s\n"
-IDS_TOTAL_PHYS_MEM,          "Total fysisk minne:             %ld MB (%ld KB)\n"
-IDS_AVAIL_PHISICAL_MEM,      "Tilgjengelig fysisk minne:      %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_MAX,            "Virtuelt minne: Maks Størrelse: %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_AVAIL,          "Virtuelt minne: Tilgjengelig:   %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_INUSE,          "Virtuelt minne: i bruk:         %ld MB (%ld KB)\n"
-IDS_PAGEFILE_LOC,            "Sidevekslingsfil lokalsjon(er)  %s\n"
-IDS_TIME_ZONE,               "Tidssone:                       %s\n"
+IDS_TIME_ZONE,               "Tidssone:              %s\n"
+IDS_TOTAL_PHYS_MEM,          "Total fysisk minne:             %s MB\n"
+IDS_AVAIL_PHISICAL_MEM,      "Tilgjengelig fysisk minne:      %s MB\n"
+IDS_VIRT_MEM_MAX,            "Virtuelt minne: Maks Størrelse: %s MB\n"
+IDS_VIRT_MEM_AVAIL,          "Virtuelt minne: Tilgjengelig:   %s MB\n"
+IDS_VIRT_MEM_INUSE,          "Virtuelt minne: i bruk:         %s MB\n"
+IDS_PAGEFILE_LOC,            "Sidevekslingsfil lokalsjon(er): %s\n"
 IDS_DOMINE,                  "Domene:                         %s\n"
 IDS_NETWORK_CARDS,           "Nettverkskort(er)               %u installert.\n"
 
index 6f48d06..749a63f 100644 (file)
@@ -43,15 +43,11 @@ IDS_OS_BUILD_TYPE,           "Rodzaj kompilacji:      %s\n"
 IDS_REG_OWNER,               "U¿ytkownik:             %s\n"
 IDS_REG_ORG,                 "Organizacja:            %s\n"
 IDS_PRODUCT_ID,              "ID produktu:            %s\n"
-IDS_INST_DATE,               "Data instalacji:        %s, "
-IDS_INST_TIME,               "%s\n"
+IDS_INST_DATE,               "Data instalacji:        %s\n"
 IDS_UP_TIME,                 "System Up Time:         %u Days, %u Hours, %u, Minutes, %u Seconds\n"
 IDS_SYS_MANUFACTURER,        "Producent systemu:      %s\n"
 IDS_SYS_MODEL,               "Model systemu:          %s\n"
-IDS_SYS_TYPE_UNKNOWN,        "Rodzaj systemu:         Unknown\n"
-IDS_SYS_TYPE_X86,            "Architektura:           X86-based PC\n"
-IDS_SYS_TYPE_IA64,           "Architektura:           IA64-based PC\n"
-IDS_SYS_TYPE_AMD64,          "Rodzaj systemu:         AMD64-based PC\n"
+IDS_SYS_TYPE,                "Rodzaj systemu:         %s\n"
 IDS_PROCESSORS,              "Ilo\9cæ Procesorów:       %u.\n"
 IDS_BIOS_DATE,               "Data BIOSu:             %s\n"
 IDS_BIOS_VERSION,            "Wersja BIOSu:           %s\n"
@@ -60,13 +56,13 @@ IDS_SYS_DIR,                 "Katalog Systemowy:      %s\n"
 IDS_BOOT_DEV,                "Urz¹dzenie \9fród³owe:    %s\n"
 IDS_SYS_LOCALE,              "Wersja lokalizacji:     %s\n"
 IDS_INPUT_LOCALE,            "Lokalizacja klawiatury: %s\n"
-IDS_TOTAL_PHYS_MEM,          "Pamiêci fizycznej ogó³em:        %ld MB (%ld KB)\n"
-IDS_AVAIL_PHISICAL_MEM,      "Dostêpnej pamiêci fizycznej:     %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_MAX,            "Pamiêci wirtualnej: Maksymalnie: %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_AVAIL,          "Pamiêci wirtualnej: Dostêpne:    %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_INUSE,          "Pamiêci wirtualnej: W u¿yciu:    %ld MB (%ld KB)\n"
-IDS_PAGEFILE_LOC,            "Lokalizacja pliku wymiany  %s\n"
-IDS_TIME_ZONE,               "Strefa czasowa:            %s\n"
+IDS_TIME_ZONE,               "Strefa czasowa:         %s\n"
+IDS_TOTAL_PHYS_MEM,          "Pamiêci fizycznej ogó³em:        %s MB\n"
+IDS_AVAIL_PHISICAL_MEM,      "Dostêpnej pamiêci fizycznej:     %s MB\n"
+IDS_VIRT_MEM_MAX,            "Pamiêci wirtualnej: maksymalnie: %s MB\n"
+IDS_VIRT_MEM_AVAIL,          "Pamiêci wirtualnej: dostêpne:    %s MB\n"
+IDS_VIRT_MEM_INUSE,          "Pamiêci wirtualnej: w u¿yciu:    %s MB\n"
+IDS_PAGEFILE_LOC,            "Lokalizacja pliku wymiany: %s\n"
 IDS_DOMINE,                  "Domena:                    %s\n"
 IDS_NETWORK_CARDS,           "Liczba kart sieciowych     %u.\n"
 
index cfe2748..f534146 100644 (file)
@@ -40,15 +40,11 @@ IDS_OS_BUILD_TYPE,           "OS Build typ:             %s\n"
 IDS_REG_OWNER,               "Registovanì vlastn¡k:     %s\n"
 IDS_REG_ORG,                 "Registrovan  organiz cia: %s\n"
 IDS_PRODUCT_ID,              "ID produktu:              %s\n"
-IDS_INST_DATE,               "D tum inçtal cie:         %s, "
-IDS_INST_TIME,               "%s\n"
+IDS_INST_DATE,               "D tum inçtal cie:         %s\n"
 IDS_UP_TIME,                 "System Up Time:           %u Days, %u Hours, %u, Minutes, %u Seconds\n"
 IDS_SYS_MANUFACTURER,        "System Manufacturer:      %s\n"
 IDS_SYS_MODEL,               "System Model:             %s\n"
-IDS_SYS_TYPE_UNKNOWN,        "Typ syst\82mu:              Nezn my\n"
-IDS_SYS_TYPE_X86,            "Typ syst\82mu:              PC zalo§en\82 na X86\n"
-IDS_SYS_TYPE_IA64,           "Typ syst\82mu:              PC zalo§en\82 na IA64\n"
-IDS_SYS_TYPE_AMD64,          "Typ syst\82mu:              PC zalo§en\82 na AMD64\n"
+IDS_SYS_TYPE,                "Typ syst\82mu:              %s\n"
 IDS_PROCESSORS,              "Procesor(y):              %u Procesor(y) nainçtalovanì.\n"
 IDS_BIOS_DATE,               "D tum BIOSu:              %s\n"
 IDS_BIOS_VERSION,            "Verzia BIOSu:             %s\n"
@@ -57,13 +53,13 @@ IDS_SYS_DIR,                 "Adres
 IDS_BOOT_DEV,                "Zav dzacie zariadenie:    %s\n"
 IDS_SYS_LOCALE,              "System Locale:            %s\n"
 IDS_INPUT_LOCALE,            "Input Locale:             %s\n"
-IDS_TOTAL_PHYS_MEM,          "Celkov  fyzick  pam\84\9c:      %ld MB (%ld KB)\n"
-IDS_AVAIL_PHISICAL_MEM,      "Dostupn  fyzick  pam\84\9c:     %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_MAX,            "Virtu lna pam\84\9c: Max Size:  %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_AVAIL,          "Virtu lna pam\84\9c: Available: %ld MB (%ld KB)\n"
-IDS_VIRT_MEM_INUSE,          "Virtu lna pam\84\9c: In Use:    %ld MB (%ld KB)\n"
-IDS_PAGEFILE_LOC,            "Umiestnenie(a) str nkovacieho s£boru: %s\n"
 IDS_TIME_ZONE,               "¬asov\82 p smo:             %s\n"
+IDS_TOTAL_PHYS_MEM,          "Celkov  fyzick  pam\84\9c:      %s MB\n"
+IDS_AVAIL_PHISICAL_MEM,      "Dostupn  fyzick  pam\84\9c:     %s MB\n"
+IDS_VIRT_MEM_MAX,            "Virtu lna pam\84\9c: Max Size:  %s MB\n"
+IDS_VIRT_MEM_AVAIL,          "Virtu lna pam\84\9c: Available: %s MB\n"
+IDS_VIRT_MEM_INUSE,          "Virtu lna pam\84\9c: In Use:    %s MB\n"
+IDS_PAGEFILE_LOC,            "Umiestnenie(a) str nkovacieho s£boru: %s\n"
 IDS_DOMINE,                  "Dom\82na:                   %s\n"
 IDS_NETWORK_CARDS,           "Sie\9cov  karta(y)          %u nainçtalovan .\n"
 
index edc724e..eccf833 100644 (file)
@@ -44,15 +44,11 @@ IDS_OS_BUILD_TYPE,          "
 IDS_REG_OWNER,              "Çàðåºñòðîâàíèé âëàñíèê:    %s\n"
 IDS_REG_ORG,                "Çàðåºñòðîâàíà îðãàí³çàö³ÿ: %s\n"
 IDS_PRODUCT_ID,             "ID ïðîäóêòà:               %s\n"
-IDS_INST_DATE,              "Äàòà óñòàíîâêè:            %s, "
-IDS_INST_TIME,              "%s\n"
+IDS_INST_DATE,              "Äàòà óñòàíîâêè:            %s\n"
 IDS_UP_TIME,                "System Up Time:            %u Days, %u Hours, %u, Minutes, %u Seconds\n"
 IDS_SYS_MANUFACTURER,       "System Manufacturer:       %s\n"
 IDS_SYS_MODEL,              "System Model:              %s\n"
-IDS_SYS_TYPE_UNKNOWN,       "Òèï ñèñòåìè:               Íåâ³äîìà\n"
-IDS_SYS_TYPE_X86,           "Òèï ñèñòåìè:               X86-based PC\n"
-IDS_SYS_TYPE_IA64,          "Òèï ñèñòåìè:               IA64-based PC\n"
-IDS_SYS_TYPE_AMD64,         "Òèï ñèñòåìè:               AMD64-based PC\n"
+IDS_SYS_TYPE,               "Òèï ñèñòåìè:               %s\n"
 IDS_PROCESSORS,             "Ïðîöåñîð(è):               %u ïðîöåñîð(à,³â) âñòàíîâëåíî.\n"
 IDS_BIOS_DATE,              "Äàòà BIOS:                 %s\n"
 IDS_BIOS_VERSION,           "Âåðñ³ÿ BIOS:               %s\n"
@@ -61,13 +57,13 @@ IDS_SYS_DIR,                "
 IDS_BOOT_DEV,               "Ïðèñòð³é çàâàíòàæåííÿ:     %s\n"
 IDS_SYS_LOCALE,             "Ìîâà ñèñòåìè:              %s\n"
 IDS_INPUT_LOCALE,           "Ìîâà ââîäó:                %s\n"
-IDS_TOTAL_PHYS_MEM,         "Âñüîãî ô³çè÷íî¿ ïàì'ÿò³:          %ld ÌÁ (%ld ÊÁ)\n"
-IDS_AVAIL_PHISICAL_MEM,     "Äîñòóïíî ô³çè÷íî¿ ïàì'ÿò³:        %ld ÌÁ (%ld ÊÁ)\n"
-IDS_VIRT_MEM_MAX,           "³ðòóàëüíà ïàì'ÿòü: Ìàêñ. ðîçì³ð: %ld ÌÁ (%ld ÊÁ)\n"
-IDS_VIRT_MEM_AVAIL,         "³ðòóàëüíà ïàì'ÿòü: Äîñòóïíî:     %ld ÌÁ (%ld ÊÁ)\n"
-IDS_VIRT_MEM_INUSE,         "³ðòóàëüíà ïàì'ÿòü: Âèêîðèñò.:    %ld ÌÁ (%ld ÊÁ)\n"
-IDS_PAGEFILE_LOC,           "Ðîçòàøóâàííÿ ôàéëó äîâàíòàæåííÿ   %s\n"
-IDS_TIME_ZONE,              "×àñîâèé ïîÿñ:             %s\n"
+IDS_TIME_ZONE,              "×àñîâèé ïîÿñ:              %s\n"
+IDS_TOTAL_PHYS_MEM,         "Âñüîãî ô³çè÷íî¿ ïàì'ÿò³:          %s ÌÁ\n"
+IDS_AVAIL_PHISICAL_MEM,     "Äîñòóïíî ô³çè÷íî¿ ïàì'ÿò³:        %s ÌÁ\n"
+IDS_VIRT_MEM_MAX,           "³ðòóàëüíà ïàì'ÿòü: Ìàêñ. ðîçì³ð: %s ÌÁ\n"
+IDS_VIRT_MEM_AVAIL,         "³ðòóàëüíà ïàì'ÿòü: Äîñòóïíî:     %s ÌÁ\n"
+IDS_VIRT_MEM_INUSE,         "³ðòóàëüíà ïàì'ÿòü: Âèêîðèñò.:    %s ÌÁ\n"
+IDS_PAGEFILE_LOC,           "Ðîçòàøóâàííÿ ôàéëó äîâàíòàæåííÿ:  %s\n"
 IDS_DOMINE,                 "Äîìåí:                    %s\n"
 IDS_NETWORK_CARDS,          "Ìåðåæíà êàðòà(è)          %u Installed.\n"
 
index eb28aea..da44083 100644 (file)
@@ -8,11 +8,10 @@
 #define IDS_REG_ORG             105
 #define IDS_PRODUCT_ID          106
 #define IDS_INST_DATE           107
-#define IDS_INST_TIME           108
 #define IDS_UP_TIME             109
 #define IDS_SYS_MANUFACTURER    110
 #define IDS_SYS_MODEL           111
-#define IDS_SYS_TYPE_UNKNOWN    112
+#define IDS_SYS_TYPE            112
 #define IDS_PROCESSORS          113
 #define IDS_BIOS_DATE           114
 #define IDS_BIOS_VERSION        115
@@ -30,6 +29,3 @@
 #define IDS_TIME_ZONE           127
 #define IDS_DOMINE              128
 #define IDS_NETWORK_CARDS       130
-#define IDS_SYS_TYPE_X86        140
-#define IDS_SYS_TYPE_IA64       141
-#define IDS_SYS_TYPE_AMD64      142
index 68b32e1..1e911de 100644 (file)
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 /* Copyright (C) 2007, Dmitry Chapyshev <lentind@yandex.ru> */
+/* Copyright (C) 2011, Rafal Harabien <rafalh1992@o2.pl> */
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
 #include <windows.h>
-#include <io.h>
 #include <tchar.h>
+#include <time.h>
 
 #include "resource.h"
 
 #define BUFFER_SIZE 32767
-#define B_TO_MB(bytes) ((bytes)/(1024*1024))
-#define B_TO_KB(bytes) ((bytes)/1024)
 
 /* Load from resource and convert to OEM */
 static
 BOOL
-GetOemStrings(UINT rcID, LPSTR OutMsg)
+GetOemStrings(UINT rcID, LPTSTR OutMsg)
 {
     TCHAR Msg[BUFFER_SIZE];
+    
     if (LoadString(GetModuleHandle(NULL), rcID, (LPTSTR)Msg, BUFFER_SIZE))
     {
         CharToOem(Msg, OutMsg);
@@ -46,27 +46,124 @@ GetOemStrings(UINT rcID, LPSTR OutMsg)
 /* Load data from registry */
 static
 BOOL
-GetRegistryValue(HKEY hKeyName, LPCTSTR SubKey, LPCTSTR ValueName, LPCTSTR Buf)
+RegGetSZ(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpValueName, LPTSTR Buf)
 {
-    DWORD CharCount = BUFFER_SIZE;
-    HKEY hKey;
-    LONG lRet;
-
-    lRet = RegOpenKeyEx(hKeyName,
-                        SubKey,
-                        0,
-                        KEY_QUERY_VALUE,
-                        &hKey);
-    if (lRet != ERROR_SUCCESS) return FALSE;
-    lRet = RegQueryValueEx(hKey,
-                           ValueName,
-                           NULL,
-                           NULL,
-                           (LPBYTE)Buf,
-                           &CharCount);
-    if (lRet != ERROR_SUCCESS) return FALSE;
-    RegCloseKey(hKey);
-    return TRUE;
+    DWORD dwBytes = BUFFER_SIZE*sizeof(TCHAR), dwType;
+    BOOL bRet = TRUE;
+    
+    /* If SubKy is specified open it */
+    if (lpSubKey && RegOpenKeyEx(hKey,
+                                 lpSubKey,
+                                 0,
+                                 KEY_QUERY_VALUE,
+                                 &hKey) != ERROR_SUCCESS)
+    {
+        //_tprintf("Warning! Cannot open %s. Last error: %lu.\n", lpSubKey, GetLastError());
+        return FALSE;
+    }
+
+    if (RegQueryValueEx(hKey,
+                        lpValueName,
+                        NULL,
+                        &dwType,
+                        (LPBYTE)Buf,
+                        &dwBytes) != ERROR_SUCCESS || (dwType != REG_SZ && dwType != REG_MULTI_SZ))
+    {
+        //_tprintf("Warning! Cannot query %s. Last error: %lu, type: %lu.\n", lpValueName, GetLastError(), dwType);
+        dwBytes = 0;
+        bRet = FALSE;
+    }
+    
+    /* Close key if we opened it */
+    if (lpSubKey)
+        RegCloseKey(hKey);
+    
+    /* NULL-terminate string */
+    Buf[min(BUFFER_SIZE-1, dwBytes/sizeof(TCHAR))] = TEXT('\0');
+    
+    return bRet;
+}
+
+static
+BOOL
+RegGetDWORD(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpValueName, LPDWORD lpData)
+{
+    DWORD dwBytes = sizeof(*lpData), dwType;
+    BOOL bRet = TRUE;
+
+    /* If SubKy is specified open it */
+    if (lpSubKey && RegOpenKeyEx(hKey,
+                                 lpSubKey,
+                                 0,
+                                 KEY_QUERY_VALUE,
+                                 &hKey) != ERROR_SUCCESS)
+    {
+        return FALSE;
+    }
+
+    if (RegQueryValueEx(hKey,
+                        lpValueName,
+                        NULL,
+                        &dwType,
+                        (LPBYTE)lpData,
+                        &dwBytes) != ERROR_SUCCESS || dwType != REG_DWORD)
+    {
+        //_tprintf("Warning! Cannot query %s. Last err: %lu, type: %lu\n", lpValueName, GetLastError(), dwType);
+        *lpData = 0;
+        bRet = FALSE;
+    }
+    
+    /* Close key if we opened it */
+    if (lpSubKey)
+        RegCloseKey(hKey);
+    
+    return bRet;
+}
+
+static
+void
+FormatBytes(LPTSTR Buf, unsigned cBytes)
+{
+    TCHAR szMB[32], Tmp[BUFFER_SIZE];
+    NUMBERFMT fmt;
+    
+    itoa(cBytes / (1024*1024), szMB, 10);
+    
+    fmt.NumDigits = 0;
+    fmt.LeadingZero = 0;
+    fmt.Grouping = 3;
+    fmt.lpDecimalSep = TEXT("");
+    fmt.lpThousandSep = TEXT(" ");
+    fmt.NegativeOrder = 0;
+    if(!GetNumberFormat(LOCALE_SYSTEM_DEFAULT, 0, szMB, &fmt, Tmp, BUFFER_SIZE))
+        printf("Error! GetNumberFormat failed.\n");
+    
+    CharToOem(Tmp, Buf);
+}
+
+static
+void
+FormatDateTime(time_t Time, LPTSTR lpBuf)
+{
+    unsigned cchBuf = BUFFER_SIZE, i;
+    SYSTEMTIME SysTime;
+    const struct tm *lpTm;
+    
+    lpTm = localtime(&Time);
+    SysTime.wYear = (WORD)(1900 + lpTm->tm_year);
+    SysTime.wMonth = (WORD)(1 + lpTm->tm_mon);
+    SysTime.wDayOfWeek = (WORD)lpTm->tm_wday;
+    SysTime.wDay = (WORD)lpTm->tm_mday;
+    SysTime.wHour = (WORD)lpTm->tm_hour;
+    SysTime.wMinute = (WORD)lpTm->tm_min;
+    SysTime.wSecond = (WORD)lpTm->tm_sec;
+    SysTime.wMilliseconds = 0;
+    
+    i = GetDateFormat(LOCALE_SYSTEM_DEFAULT, 0, &SysTime, NULL, lpBuf, cchBuf);
+    if (i)
+        --i; /* don't count NULL character */
+    i += _stprintf(lpBuf + i, TEXT(", "));
+    GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, &SysTime, NULL, lpBuf + i, cchBuf - i);
 }
 
 /* Show usage */
@@ -75,46 +172,63 @@ VOID
 Usage(VOID)
 {
     TCHAR Buf[BUFFER_SIZE];
-    if(GetOemStrings(IDS_USAGE, Buf)) printf("%s",Buf);
+    
+    if(GetOemStrings(IDS_USAGE, Buf))
+        _tprintf("%s", Buf);
 }
 
 /* Print all system information */
 VOID
 AllSysInfo(VOID)
 {
-    DWORD dwCharCount = BUFFER_SIZE;
+    DWORD dwCharCount = BUFFER_SIZE, dwTimestamp;
     OSVERSIONINFO VersionInfo;
     SYSTEM_INFO SysInfo;
     TCHAR Buf[BUFFER_SIZE], Tmp[BUFFER_SIZE], Msg[BUFFER_SIZE], szSystemDir[MAX_PATH];
+    const TCHAR *lpcszSysType;
     MEMORYSTATUS MemoryStatus;
     unsigned int cSeconds;
     TIME_ZONE_INFORMATION TimeZoneInfo;
+    HKEY hKey;
 
     if (!GetSystemDirectory(szSystemDir, sizeof(szSystemDir)/sizeof(szSystemDir[0])))
-        printf("Error getting: GetSystemDirectory\n");
+    {
+        _tprintf("Error! GetSystemDirectory failed.\n");
+        return;
+    }
+
     GetSystemInfo(&SysInfo);
 
     // getting computer name
     dwCharCount = BUFFER_SIZE;
     if (!GetComputerName(Buf, &dwCharCount))
-        printf("Error getting: GetComputerName");
-    if (GetOemStrings(IDS_HOST_NAME, Msg))
-        printf(Msg, Buf);
+        _tprintf("Error! GetComputerName failed.\n");
+    else if (GetOemStrings(IDS_HOST_NAME, Msg))
+        _tprintf(Msg, Buf);
+
+    // open CurrentVersion key
+    if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+                    TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"),
+                    0,
+                    KEY_QUERY_VALUE,
+                    &hKey) != ERROR_SUCCESS)
+    {
+        _tprintf("Error! RegOpenKeyEx failed.\n");
+        return;
+    }
 
     //getting OS Name
-    GetRegistryValue(HKEY_LOCAL_MACHINE,
-                     TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"),
-                     TEXT("ProductName"),
-                     Buf);
-    if (GetOemStrings(IDS_OS_NAME, Msg)) printf(Msg, Buf);
+    RegGetSZ(hKey, NULL, TEXT("ProductName"), Buf);
+    if (GetOemStrings(IDS_OS_NAME, Msg))
+        _tprintf(Msg, Buf);
 
     //getting OS Version
     ZeroMemory(&VersionInfo, sizeof(VersionInfo));
     VersionInfo.dwOSVersionInfoSize = sizeof(VersionInfo);
     GetVersionEx(&VersionInfo);
-    
+
     if (GetOemStrings(IDS_OS_VERSION, Msg))
-        printf(Msg,
+        _tprintf(Msg,
                (unsigned)VersionInfo.dwMajorVersion,
                (unsigned)VersionInfo.dwMinorVersion,
                (unsigned)VersionInfo.dwBuildNumber,
@@ -126,53 +240,40 @@ AllSysInfo(VOID)
     //getting OS Configuration
 
     //getting OS Build Type
-    if (GetRegistryValue(HKEY_LOCAL_MACHINE,
-                         TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"),
-                         TEXT("CurrentType"),
-                         Buf))
-        if (GetOemStrings(IDS_OS_BUILD_TYPE, Msg)) printf(Msg, Buf);
+    RegGetSZ(hKey, NULL, TEXT("CurrentType"), Buf);
+    if (GetOemStrings(IDS_OS_BUILD_TYPE, Msg))
+        _tprintf(Msg, Buf);
 
     //getting Registered Owner
-    if (GetRegistryValue(HKEY_LOCAL_MACHINE,
-                         TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"),
-                         TEXT("RegisteredOwner"),
-                         Buf))
-        if (GetOemStrings(IDS_REG_OWNER, Msg)) printf(Msg, Buf);
+    RegGetSZ(hKey, NULL, TEXT("RegisteredOwner"), Buf);
+    if (GetOemStrings(IDS_REG_OWNER, Msg))
+        _tprintf(Msg, Buf);
 
     //getting Registered Organization
-    if (GetRegistryValue(HKEY_LOCAL_MACHINE,
-                         TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"),
-                         TEXT("RegisteredOrganization"),
-                         Buf))
-        if (GetOemStrings(IDS_REG_ORG, Msg)) printf(Msg, Buf);
-
-    //getting Product ID // use SOFTWARE\Microsoft\Windows NT\CurrentVersion\InstallDate
-    if (GetRegistryValue(HKEY_LOCAL_MACHINE,
-                         TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"),
-                         TEXT("ProductId"),
-                         Buf))
-        if (GetOemStrings(IDS_PRODUCT_ID, Msg)) printf(Msg, Buf);
+    RegGetSZ(hKey, NULL, TEXT("RegisteredOrganization"), Buf);
+    if (GetOemStrings(IDS_REG_ORG, Msg))
+        _tprintf(Msg, Buf);
+
+    //getting Product ID
+    RegGetSZ(hKey, NULL, TEXT("ProductId"), Buf);
+    if (GetOemStrings(IDS_PRODUCT_ID, Msg))
+        _tprintf(Msg, Buf);
 
     //getting Install Date
-    if (GetRegistryValue(HKEY_LOCAL_MACHINE,
-                         TEXT("SOFTWARE\\Microsoft\\WBEM\\CIMOM"),
-                         TEXT("SetupDate"),
-                         Buf))
-        if (GetOemStrings(IDS_INST_DATE, Msg)) printf(Msg, Buf);
-
-    //getting Install Time
-    if (GetRegistryValue(HKEY_LOCAL_MACHINE,
-                         TEXT("SOFTWARE\\Microsoft\\WBEM\\CIMOM"),
-                         TEXT("SetupTime"),
-                         Buf))
-        if (GetOemStrings(IDS_INST_TIME, Msg)) printf(Msg, Buf);
+    RegGetDWORD(hKey, NULL, TEXT("InstallDate"), &dwTimestamp);
+    FormatDateTime((time_t)dwTimestamp, Buf);
+    if (GetOemStrings(IDS_INST_DATE, Msg))
+        _tprintf(Msg, Buf);
+
+    // close Current Version key now
+    RegCloseKey(hKey);
 
     //getting System Up Time
     cSeconds = GetTickCount() / 1000;
     if (GetOemStrings(IDS_UP_TIME, Msg))
-        printf(Msg, cSeconds / (60*60*24), (cSeconds / (60*60)) % 24, (cSeconds / 60) % 60, cSeconds % 60);
+        _tprintf(Msg, cSeconds / (60*60*24), (cSeconds / (60*60)) % 24, (cSeconds / 60) % 60, cSeconds % 60);
 
-    //getting System Manufacturer
+    //getting System Manufacturer; HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation\Manufacturer for Win >= 6.0
     sprintf(Tmp, "%s\\oeminfo.ini", szSystemDir);
     GetPrivateProfileString(TEXT("General"),
                             TEXT("Manufacturer"),
@@ -181,9 +282,9 @@ AllSysInfo(VOID)
                             sizeof(Buf)/sizeof(Buf[0]),
                             Tmp);
     if (GetOemStrings(IDS_SYS_MANUFACTURER, Msg))
-        printf(Msg, Buf);
+        _tprintf(Msg, Buf);
 
-    //getting System Model
+    //getting System Model; HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation\Model for Win >= 6.0
     GetPrivateProfileString(TEXT("General"),
                             TEXT("Model"),
                             TEXT("To Be Filled By O.E.M."),
@@ -191,164 +292,204 @@ AllSysInfo(VOID)
                             sizeof(Buf)/sizeof(Buf[0]),
                             Tmp);
     if (GetOemStrings(IDS_SYS_MODEL, Msg))
-        printf(Msg, Buf);
+        _tprintf(Msg, Buf);
 
     //getting System type
     switch (SysInfo.wProcessorArchitecture)
     {
-        case PROCESSOR_ARCHITECTURE_UNKNOWN:
-            if (GetOemStrings(IDS_SYS_TYPE_UNKNOWN, Msg)) printf("%s", Msg);
-            break;
         case PROCESSOR_ARCHITECTURE_INTEL:
-            if (GetOemStrings(IDS_SYS_TYPE_X86, Msg)) printf("%s", Msg);
+            lpcszSysType = TEXT("X86-based PC");
             break;
         case PROCESSOR_ARCHITECTURE_IA64:
-            if (GetOemStrings(IDS_SYS_TYPE_IA64, Msg)) printf("%s", Msg);
+            lpcszSysType = TEXT("IA64-based PC");
             break;
         case PROCESSOR_ARCHITECTURE_AMD64:
-            if (GetOemStrings(IDS_SYS_TYPE_AMD64, Msg)) printf("%s", Msg);
+            lpcszSysType = TEXT("AMD64-based PC");
+            break;
+        default:
+            lpcszSysType = TEXT("Unknown");
             break;
     }
+    if (GetOemStrings(IDS_SYS_TYPE, Msg))
+        _tprintf(Msg, lpcszSysType);
 
     //getting Processor(s)
     if (GetOemStrings(IDS_PROCESSORS, Msg))
     {
         unsigned int i;
-        printf(Msg, (unsigned int)SysInfo.dwNumberOfProcessors);
+        _tprintf(Msg, (unsigned int)SysInfo.dwNumberOfProcessors);
         for(i = 0; i < (unsigned int)SysInfo.dwNumberOfProcessors; i++)
         {
-            sprintf(Tmp,"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\%u",i);
-            if (GetRegistryValue(HKEY_LOCAL_MACHINE,
-                                 (LPCTSTR)Tmp,
-                                 TEXT("Identifier"),
-                                 Buf))
-                printf("                               [0%u]: %s", i+1, Buf);
-            if (GetRegistryValue(HKEY_LOCAL_MACHINE,
-                                 (LPCTSTR)Tmp,
-                                 TEXT("VendorIdentifier"),
-                                 Buf))
-                printf(" %s\n", Buf);
+            sprintf(Tmp, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\%u",i);
+
+            RegGetSZ(HKEY_LOCAL_MACHINE, Tmp, TEXT("Identifier"), Buf);
+            _tprintf("                       [%02u]: %s", i+1, Buf);
+
+            RegGetSZ(HKEY_LOCAL_MACHINE, Tmp, TEXT("VendorIdentifier"), Buf);
+            _tprintf(" %s\n", Buf);
         }
     }
 
     //getting BIOS Version
-    if (GetRegistryValue(HKEY_LOCAL_MACHINE,
-                         TEXT("HARDWARE\\DESCRIPTION\\System"),
-                         TEXT("SystemBiosVersion"),
-                         Buf))
-        if (GetOemStrings(IDS_BIOS_VERSION, Msg)) printf(Msg, Buf);
+    RegGetSZ(HKEY_LOCAL_MACHINE,
+             TEXT("HARDWARE\\DESCRIPTION\\System"),
+             TEXT("SystemBiosVersion"),
+             Buf);
+    if (GetOemStrings(IDS_BIOS_VERSION, Msg))
+        _tprintf(Msg, Buf);
 
     //gettings BIOS date
-    if (GetRegistryValue(HKEY_LOCAL_MACHINE,
-                         TEXT("HARDWARE\\DESCRIPTION\\System"),
-                         TEXT("SystemBiosDate"),
-                         Buf))
-        if (GetOemStrings(IDS_BIOS_DATE, Msg)) printf(Msg, Buf);
+    RegGetSZ(HKEY_LOCAL_MACHINE,
+             TEXT("HARDWARE\\DESCRIPTION\\System"),
+             TEXT("SystemBiosDate"),
+             Buf);
+    if (GetOemStrings(IDS_BIOS_DATE, Msg))
+        _tprintf(Msg, Buf);
 
     //getting ReactOS Directory
-    if (!GetWindowsDirectory(Buf, BUFFER_SIZE)) printf("Error getting: GetWindowsDirectory");
-    if (GetOemStrings(IDS_ROS_DIR, Msg)) printf(Msg, Buf);
+    if (!GetWindowsDirectory(Buf, BUFFER_SIZE))
+        _tprintf("Error! GetWindowsDirectory failed.");
+    else if (GetOemStrings(IDS_ROS_DIR, Msg))
+        _tprintf(Msg, Buf);
 
     //getting System Directory
-    if (GetOemStrings(IDS_SYS_DIR, Msg)) printf(Msg, szSystemDir);
+    if (GetOemStrings(IDS_SYS_DIR, Msg))
+        _tprintf(Msg, szSystemDir);
 
     //getting Boot Device
-    if (GetRegistryValue(HKEY_LOCAL_MACHINE,
-                         TEXT("SYSTEM\\Setup"),
-                         TEXT("SystemPartition"),
-                         Buf))
-        if (GetOemStrings(IDS_BOOT_DEV, Msg)) printf(Msg, Buf);
+    RegGetSZ(HKEY_LOCAL_MACHINE,
+             TEXT("SYSTEM\\Setup"),
+             TEXT("SystemPartition"),
+             Buf);
+    if (GetOemStrings(IDS_BOOT_DEV, Msg))
+        _tprintf(Msg, Buf);
 
     //getting System Locale
-    if (GetRegistryValue(HKEY_CURRENT_USER,
-                         TEXT("Control Panel\\International"),
-                         TEXT("Locale"),
-                         Tmp))
-        if (GetRegistryValue(HKEY_CLASSES_ROOT,
-                             TEXT("MIME\\Database\\Rfc1766"),
-                             (LPTSTR)Tmp,
-                             Buf))
-            if (GetOemStrings(IDS_SYS_LOCALE, Msg)) printf(Msg, Buf);
+    if (RegGetSZ(HKEY_CURRENT_USER,
+                 TEXT("Control Panel\\International"),
+                 TEXT("Locale"),
+                 Tmp))
+        if (RegGetSZ(HKEY_CLASSES_ROOT,
+                     TEXT("MIME\\Database\\Rfc1766"),
+                     Tmp,
+                     Buf))
+            if (GetOemStrings(IDS_SYS_LOCALE, Msg))
+                _tprintf(Msg, Buf);
 
     //getting Input Locale
-    if (GetRegistryValue(HKEY_CURRENT_USER,
-                         TEXT("Keyboard Layout\\Preload"),
-                         TEXT("1"),
-                         Buf))
+    if (RegGetSZ(HKEY_CURRENT_USER,
+                 TEXT("Keyboard Layout\\Preload"),
+                 TEXT("1"),
+                 Buf))
     {
-        int i,j;
-        for(j = 0, i = 4; i <= 8; j++, i++) Tmp[j] = Buf[i];
-        if (GetRegistryValue(HKEY_CLASSES_ROOT,
-                             TEXT("MIME\\Database\\Rfc1766"),
-                             (LPTSTR)Tmp,
-                             Buf))
-            if (GetOemStrings(IDS_INPUT_LOCALE, Msg)) printf(Msg, Buf);
+        int i, j;
+
+        for(j = 0, i = 4; i <= 8; j++, i++)
+            Tmp[j] = Buf[i];
+
+        if (RegGetSZ(HKEY_CLASSES_ROOT,
+                     TEXT("MIME\\Database\\Rfc1766"),
+                     Tmp,
+                     Buf))
+            if (GetOemStrings(IDS_INPUT_LOCALE, Msg))
+                _tprintf(Msg, Buf);
     }
 
     //getting Time Zone
     GetTimeZoneInformation(&TimeZoneInfo);
-    sprintf(Tmp,"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones\\%S",TimeZoneInfo.StandardName);
-    if (GetRegistryValue(HKEY_LOCAL_MACHINE,
-                         (LPCTSTR)Tmp,
-                         TEXT("Display"),
-                         Buf))
-        if (GetOemStrings(IDS_TIME_ZONE, Msg)) printf(Msg, Buf);
+    
+    /* Open Time Zones key */
+    if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+                    TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones"),
+                    0,
+                    KEY_ENUMERATE_SUB_KEYS|KEY_READ,
+                    &hKey) == ERROR_SUCCESS)
+    {
+        unsigned i;
+        
+        /* Find current timezone */
+        dwCharCount = 256; // Windows seems to have a bug - it doesnt accept BUFFER_SIZE here
+        for(i = 0; RegEnumKeyEx(hKey, i, Tmp, &dwCharCount, NULL, NULL, NULL, NULL) == ERROR_SUCCESS; ++i, dwCharCount = 255)
+        {
+#ifdef _UNICODE
+            RegGetSZ(hKey, Tmp, TEXT("Std"), Buf);
+            
+            if(!wcscmp(wBuf, TimeZoneInfo.StandardName))
+#else
+            wchar_t wBuf[BUFFER_SIZE];
+
+            RegGetSZ(hKey, Tmp, TEXT("Std"), Buf);
+            mbstowcs(wBuf, Buf, BUFFER_SIZE);
+            
+            if(!wcscmp(wBuf, TimeZoneInfo.StandardName))
+#endif
+            {
+                RegGetSZ(hKey, Tmp, TEXT("Display"), Buf);
 
+                if (GetOemStrings(IDS_TIME_ZONE, Msg))
+                    _tprintf(Msg, Buf);
+
+                break;
+            }
+        }
+        RegCloseKey(hKey);
+    }
+    
+    
     //getting Total Physical Memory
     GlobalMemoryStatus(&MemoryStatus);
-    if(GetOemStrings(IDS_TOTAL_PHYS_MEM, Msg))
-        printf(Msg,
-               B_TO_MB(MemoryStatus.dwTotalPhys),
-               B_TO_KB(MemoryStatus.dwTotalPhys));
+    FormatBytes(Buf, MemoryStatus.dwTotalPhys);
+    if (GetOemStrings(IDS_TOTAL_PHYS_MEM, Msg))
+        _tprintf(Msg, Buf);
 
     //getting Available Physical Memory
-    if(GetOemStrings(IDS_AVAIL_PHISICAL_MEM,Msg))
-        printf(Msg,
-               B_TO_MB(MemoryStatus.dwAvailPhys),
-               B_TO_KB(MemoryStatus.dwAvailPhys));
+    FormatBytes(Buf, MemoryStatus.dwAvailPhys);
+    if (GetOemStrings(IDS_AVAIL_PHISICAL_MEM,Msg))
+        _tprintf(Msg, Buf);
 
     //getting Virtual Memory: Max Size
-    if(GetOemStrings(IDS_VIRT_MEM_MAX, Msg))
-        printf(Msg,
-               B_TO_MB(MemoryStatus.dwTotalVirtual),
-               B_TO_KB(MemoryStatus.dwTotalVirtual));
+    FormatBytes(Buf, MemoryStatus.dwTotalVirtual);
+    if (GetOemStrings(IDS_VIRT_MEM_MAX, Msg))
+        _tprintf(Msg, Buf);
 
     //getting Virtual Memory: Available
-    if(GetOemStrings(IDS_VIRT_MEM_AVAIL, Msg))
-        printf(Msg,
-               B_TO_MB(MemoryStatus.dwAvailVirtual),
-               B_TO_KB(MemoryStatus.dwAvailVirtual));
+    FormatBytes(Buf, MemoryStatus.dwAvailVirtual);
+    if (GetOemStrings(IDS_VIRT_MEM_AVAIL, Msg))
+        _tprintf(Msg, Buf);
 
     //getting Virtual Memory: In Use
-    if(GetOemStrings(IDS_VIRT_MEM_INUSE, Msg))
-        printf(Msg,
-               B_TO_MB(MemoryStatus.dwTotalVirtual-MemoryStatus.dwAvailVirtual),
-               B_TO_KB(MemoryStatus.dwTotalVirtual-MemoryStatus.dwAvailVirtual));
+    FormatBytes(Buf, MemoryStatus.dwTotalVirtual-MemoryStatus.dwAvailVirtual);
+    if (GetOemStrings(IDS_VIRT_MEM_INUSE, Msg))
+        _tprintf(Msg, Buf);
 
     //getting Page File Location(s)
-    if (GetRegistryValue(HKEY_LOCAL_MACHINE,
-                         TEXT("SYSTEM\\ControlSet001\\Control\\Session Manager\\Memory Management"),
-                         TEXT("PagingFiles"),
-                         Buf))
+    if (RegGetSZ(HKEY_LOCAL_MACHINE,
+                 TEXT("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management"),
+                 TEXT("PagingFiles"),
+                 Buf))
     {
         int i;
+
         for(i = 0; i < strlen((char*)Buf); i++)
         {
-            if (Buf[i] == ' ')
+            if (Buf[i] == TEXT(' '))
             {
-                Buf[i] = '\0';
+                Buf[i] = TEXT('\0');
                 break;
             }
         }
-        if(GetOemStrings(IDS_PAGEFILE_LOC, Msg)) printf(Msg, Buf);
+        
+        if(GetOemStrings(IDS_PAGEFILE_LOC, Msg))
+            _tprintf(Msg, Buf);
     }
 
     //getting Domain
-    if (GetRegistryValue(HKEY_LOCAL_MACHINE,
-                         TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon"),
-                         TEXT("CachePrimaryDomain"),
-                         Buf))
-        if(GetOemStrings(IDS_DOMINE, Msg)) printf(Msg, Buf);
+    if (RegGetSZ(HKEY_LOCAL_MACHINE,
+                 TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon"),
+                 TEXT("CachePrimaryDomain"),
+                 Buf))
+        if(GetOemStrings(IDS_DOMINE, Msg))
+            _tprintf(Msg, Buf);
 
     //getting Logon Server
 
@@ -368,6 +509,8 @@ main(int argc, char *argv[])
         Usage();
         return 0;
     }
+
     AllSysInfo();
+
     return 0;
 }