News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

OS Info Dump

Started by dedndave, July 28, 2009, 01:41:48 PM

Previous topic - Next topic

dedndave

i am trying to collect information about the different OS's so i can ID them
your help would be greatly appreciated
see the attached program - source included
try to be specific, like "gold edition" or "64-bit"  (actually, i think the 64-bit info is elsewhere - i will work on that)

my OS: Windows XP (Pro) Media Center Edition 2005, sp2

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"ProductName"="Microsoft Windows XP"
"CurrentVersion"="5.1"
"CurrentBuildNumber"="2600"
"SubVersionNumber"=""
"CSDVersion"="Service Pack 2"
"BuildLab"="2600.xpsp_sp2_rtm.040803-2158"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center]
"Ident"="4.0"


EDIT- update - added "ProductId" with the product key portion X'ed out
EDIT - version 2 - added GetVersionEx
EDIT - version 2.01 - added preliminary support for win95/98/98se/ME
EDIT - version 2.02 - modified win95/98/98se/ME so that the os version info structure size is set to 148 for older OS's
EDIT - version 2.03 - added version to banner - overwrite "Press any key to exit" for shorter screen


[attachment deleted by admin]

UtillMasm

C:\>OSinfo.exe

DednDave OS Info Dump

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"ProductName"="Windows Vista (TM) Ultimate"
"CurrentVersion"="6.0"
"CurrentBuildNumber"="6002"
"SubVersionNumber"=(Value not found)
"CSDVersion"="Service Pack 2"
"BuildLab"="6002.lh_sp2rtm.090410-1830"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center]
"Ident"="5.0"

Press any key to exit

fearless

Windows XP Home Edition with Service Pack3 (32bit)

DednDave OS Info Dump

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"ProductName"="Microsoft Windows XP"
"CurrentVersion"="5.1"
"CurrentBuildNumber"="2600"
"SubVersionNumber"=""
"CSDVersion"="Service Pack 3"
"BuildLab"="2600.xpsp_sp3_gdr.090206-1234"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center]
"Ident"=(Key not found)
ƒearless

dedndave

thank you UtillMasm and fearless
i don't see a way to differentiate Home editions from Pro editions

fearless

Look for the Product ID as well, here is a link that explains what the start code of the product ID means:

http://wiki.lunarsoft.net/wiki/Product_IDs

Mine is 76477-OEM-0012345-67890

so 76477 seems to indicate the following: Windows XP Home OEM SP2     VRMHOEM_EN     4-08-04 12:00     76477     OEM

I remember installing XP which has SP2 already packaged with it, when i bought my new pc and put it together myself, and then i updated to SP3 once it was up and running.


HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId it has then to be converted to the 76477-OEM-0012345-67890 code. I think i have some code or some bookmarks somewhere on how that is done. Ill try and dig it out for you later on.


Edit: ok Dave, cheers for that, i edited out my key info, just in case ;-)
ƒearless

dedndave

you should remove that info fearless (or at least, the part after OEM) - but thank you
maybe i will add it and only show the first part

EDIT - very helpful link - thanks  :U

dedndave

i know how to read the binaries
but, don't you have the same info under this value ?

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"ProductId"="76477-OEM-1234567-12345"

dedndave

ok - i updated the program so it displays the first 2 parts of "ProductId"
the last 2 parts are X'ed out to hide the product key information
as always, i included the program source

My OS: Windows XP (Pro) Media Center Edition 2005, sp2

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"ProductName"="Microsoft Windows XP"
"CurrentVersion"="5.1"
"CurrentBuildNumber"="2600"
"SubVersionNumber"=""
"CSDVersion"="Service Pack 2"
"BuildLab"="2600.xpsp_sp2_rtm.040803-2158"
"ProductId"="76487-OEM-XXXXXXX-XXXXX"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center]
"Ident"="4.0"

http://www.masm32.com/board/index.php?action=dlattach;topic=11963.0;id=6522

fearless

Yep, missed that in the reg, was looking at DigitalProductID by mistake. But you got the right one anyhows :D
ƒearless

bruce1948


DednDave OS Info Dump

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"ProductName"="Microsoft Windows XP"
"CurrentVersion"="5.1"
"CurrentBuildNumber"="2600"
"SubVersionNumber"=""
"CSDVersion"="Service Pack 3"
"BuildLab"="2600.xpsp_sp3_gdr.090206-1234"
"ProductId"="76477-OEM-XXXXXXX-XXXXX"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center]
"Ident"=(Value not found)



Oriiginal install XP home SP2.

Slugsnack

MSDN server 2008 enterprise SP2 :


DednDave OS Info Dump

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"ProductName"="Windows Server (R) 2008 Enterprise"
"CurrentVersion"="6.0"
"CurrentBuildNumber"="6002"
"SubVersionNumber"=(Value not found)
"CSDVersion"="Service Pack 2"
"BuildLab"="6002.lh_sp2rtm.090410-1830"
"ProductId"="92516-082-XXXXXXX-XXXXX"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center]
"Ident"=(Value not found)

Press any key to exit

jj2007

XP Home SP2

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"ProductName"="Microsoft Windows XP"
"CurrentVersion"="5.1"
"CurrentBuildNumber"="2600"
"SubVersionNumber"=""
"CSDVersion"="Service Pack 2"
"BuildLab"="2600.xpsp_sp2_gdr.070227-2254"
"ProductId"="76434-OEM-XXXXXXX-XXXXX"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center]
"Ident"=(Key not found)

FORTRANS

Hi,

   Two older ones, Windows 2000 and 98 <g>.


DednDave OS Info Dump

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"ProductName"="Microsoft Windows 2000"
"CurrentVersion"="5.0"
"CurrentBuildNumber"="2195"
"SubVersionNumber"=(Value not found)
"CSDVersion"="Service Pack 4"
"BuildLab"=(Value not found)
"ProductId"="51873-OEM-XXXXXXX-XXXXX"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center]
"Ident"=(Key not found)

Press any key to exit

DednDave OS Info Dump

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"ProductName"=(Value not found)
"CurrentVersion"=(Value not found)
"CurrentBuildNumber"=(Value not found)
"SubVersionNumber"=(Value not found)
"CSDVersion"=(Value not found)
"BuildLab"=(Value not found)
"ProductId"=(Value not found)

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center]
"Ident"=(Key not found)

Press any key to exit


Cheers,

Steve N.

dedndave

uh oh - i am gonna hafta find something for win95/win98/win98se/winME
NT and OS2 are gonna be hard to ID also - lol
did anyone actually ever buy and use OS2 ?
Thank You, Everyone !   :U
keep em coming, guys

GregL

Windows 7 Ultimate x64 (RC)

DednDave OS Info Dump

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"ProductName"="Windows 7 Ultimate"
"CurrentVersion"="6.1"
"CurrentBuildNumber"="7100"
"SubVersionNumber"=(Value not found)
"CSDVersion"=(Value not found)
"BuildLab"="7100.winmain_win7rc.090421-1700"
"ProductId"=(Value not found)

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center]
"Ident"="6.0"


ProductId actually does exist.