The MASM Forum Archive 2004 to 2012
Welcome, Guest. Please login or register.
March 02, 2021, 07:23:56 AM

Login with username, password and session length
Search:     Advanced search
128553 Posts in 15254 Topics by 684 Members
Latest Member: mottt
* Home Help Search Login Register
+  The MASM Forum Archive 2004 to 2012
|-+  General Forums
| |-+  The Laboratory (Moderator: Mark_Larson)
| | |-+  OS Info Dump
« previous next »
Pages: 1 2 3 [4] 5 6 Print
Author Topic: OS Info Dump  (Read 53012 times)
dedndave
Member
*****
Posts: 12523


Re: OS Info Dump
« Reply #45 on: July 31, 2009, 08:38:24 AM »

thanks sinsi
let me play with that one - i may do a conditional display so it only shows one set...
Logged
fearless
Member
*****
Gender: Male
Posts: 226



Re: OS Info Dump
« Reply #46 on: July 31, 2009, 01:34:14 PM »

Couple more titbits of info i found that could be useful:


Determining NT 4.0 SP6 versus SP6a. To detect whether Service Pack 6a is installed if SP6 is detected, you can check to see if the following registry value is set to 1:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Hotfix\Q246009\Installed


http://www.codeproject.com/KB/winsdk/osdetect.aspx - similar info as before but might be useful.


http://blogs.msdn.com/pusu/archive/2009/06/19/how-do-you-detect-if-running-os-is-windows-7-or-not.aspx
http://msdn.microsoft.com/en-us/library/ms725491%28VS.85%29.aspx (overview of use of VerifyVersionInfo())

http://msdn.microsoft.com/en-us/library/ms724429%28VS.85%29.aspx
http://msdn.microsoft.com/en-us/library/ms724832%28VS.85%29.aspx
Logged

ƒearless
dedndave
Member
*****
Posts: 12523


Re: OS Info Dump
« Reply #47 on: July 31, 2009, 02:30:12 PM »

thanks again, fearless
the version number almost does the job for us
i may use that as the basic value, then append it with additional information
as always, ms leaves out just enough information to make us work for it - lol
Logged
dedndave
Member
*****
Posts: 12523


Re: OS Info Dump
« Reply #48 on: August 01, 2009, 02:13:27 AM »

i have again updated the program (ver 2.01)
this time, i added preliminary support for win95/98/98se/ME as per sinsi
if you are running win 2K or later, you will see no difference from previous runs
if you are running win95/98/98se/ME, a different Key name is used
that is, if it works - lol - it will be interesting to see it run on 95/98/ME (maybe even win 3.1 and OS/2)

i have updated the first post of the thread with the new d/l
the source file is included
here is a shortcut to the version 2.01 d/l
http://www.masm32.com/board/index.php?action=dlattach;topic=11963.0;id=6534
Logged
sinsi
Member
*****
Gender: Male
Posts: 1758


RIP Bodie 1999-2011


Re: OS Info Dump
« Reply #49 on: August 01, 2009, 06:38:55 AM »

95 OSR2 again
Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion]
"Version"="Windows 95"
"VersionNumber"="4.00.1111"
"ProductName"="Microsoft Windows 95"
"CurrentVersion"=(Value not found)
"CurrentBuildNumber"=(Value not found)
"SubVersionNumber"=" B"
"CSDVersion"=(Value not found)
"BuildLab"=(Value not found)
"ProductId"="24264-XXX-XXXXXXX-XXXXX"

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

OSVERSIONINFOEX Structure:

       Version.Build: 0.0.0
         Platform ID: Win32s on Windows 3.1
         CSD Version:
Service Pack Version: 0.0
          Suite Mask: 0000000000000000
        Product Type: 0
now it's more than 25 lines so your "DednDave OS Info Dump" doesn't show  boohoo


edit: I put an error check after GetVersionEx which returned 127 "ERROR_PROC_NOT_FOUND"
edit2: 95 (and win32s I assume) uses OSVERSION and fail when the struc size isn't 148.
Logged

Light travels faster than sound, that's why some people seem bright until you hear them.
sinsi
Member
*****
Gender: Male
Posts: 1758


RIP Bodie 1999-2011


Re: OS Info Dump
« Reply #50 on: August 01, 2009, 07:25:22 AM »

OK, forcing the struc size to 148 produces this
Code:
OSVERSIONINFOEX Structure:

       Version.Build: 4.0.67109975
         Platform ID: Win32 on Windows 95
         CSD Version:  B
Service Pack Version: 0.0
          Suite Mask: 0000000000000000
        Product Type: 0
The reason for the strange .Build number is
Quote from: Win32SDK.hlp
dwBuildNumber

Windows NT: Identifies the build number of the operating system.
Windows 95: Identifies the build number of the operating system in the low-order word. The high-order word contains the major and minor version numbers.

Logged

Light travels faster than sound, that's why some people seem bright until you hear them.
dedndave
Member
*****
Posts: 12523


Re: OS Info Dump
« Reply #51 on: August 01, 2009, 08:14:31 AM »

ok - updated to version 2.02
the os version info structure size is set to 148 for older OS's
i would like to see the displayed values for 95, of course
i also noticed you have win98se
it would be greatly appreciated, sinsi
thanks for your help
http://www.masm32.com/board/index.php?action=dlattach;topic=11963.0;id=6535
Logged
sinsi
Member
*****
Gender: Male
Posts: 1758


RIP Bodie 1999-2011


Re: OS Info Dump
« Reply #52 on: August 01, 2009, 08:36:22 AM »

Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion]
"Version"="Windows 95"
"VersionNumber"="4.00.1111"
"ProductName"="Microsoft Windows 95"
"CurrentVersion"=(Value not found)
"CurrentBuildNumber"=(Value not found)
"SubVersionNumber"=" B"
"CSDVersion"=(Value not found)
"BuildLab"=(Value not found)
"ProductId"="24264-XXX-XXXXXXX-XXXXX"

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

OSVERSIONINFOEX Structure:

       Version.Build: 4.0.67109975
         Platform ID: Win32 on Windows 95
         CSD Version:  B

Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion]
"Version"="Windows 98"
"VersionNumber"="4.10.2222"
"ProductName"="Microsoft Windows 98"
"CurrentVersion"=(Value not found)
"CurrentBuildNumber"=(Value not found)
"SubVersionNumber"=" A "
"CSDVersion"=(Value not found)
"BuildLab"=(Value not found)
"ProductId"="13909-OEM-XXXXXXX-XXXXX"

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

OSVERSIONINFOEX Structure:

       Version.Build: 4.10.67766446
         Platform ID: Win32 on Windows 95
         CSD Version:  A
Logged

Light travels faster than sound, that's why some people seem bright until you hear them.
dedndave
Member
*****
Posts: 12523


Re: OS Info Dump
« Reply #53 on: August 01, 2009, 09:04:51 AM »

very cool sinsi - many thanks
that helped a lot
i bet noone in the forum has win ME
oh - maybe Steve (FORTRANS) does - he collects old stuff like me - lol (don't tell the wifee i said that)

i made a small update - added the version to the banner title
and i overwrite the "Press any key to exit" message at exit for a shorter screen
source included, as always.....
http://www.masm32.com/board/index.php?action=dlattach;topic=11963.0;id=6537
Logged
UtillMasm
Member
*****
Posts: 560

Please use a non offensive avatar


Re: OS Info Dump
« Reply #54 on: August 01, 2009, 10:33:26 AM »

Microsoft Windows Home Server 32bit Chinese simplified with Service Pack 2
Code:
DednDave OS Info Dump Ver 2.03

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"ProductName"="Microsoft Windows Server 2003"
"CurrentVersion"="5.2"
"CurrentBuildNumber"="3790"
"SubVersionNumber"=(Value not found)
"CSDVersion"="Service Pack 2"
"BuildLab"="3790.srv03_sp2_gdr.070926-1208"
"ProductId"="00182-OEM-XXXXXXX-XXXXX"

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

OSVERSIONINFOEX Structure:

       Version.Build: 5.2.3790
         Platform ID: Win32 on Windows NT
         CSD Version: Service Pack 2
Service Pack Version: 2.0
          Suite Mask: 1000000100110001
        Product Type: Windows Server 2000/2003/2008

Press any key to exit
Logged
FORTRANS
Member
*****
Gender: Male
Posts: 1147


Imagine


Re: OS Info Dump
« Reply #55 on: August 01, 2009, 12:34:28 PM »

i bet noone in the forum has win ME
oh - maybe Steve (FORTRANS) does

   Nope, I saw that one in use at work.  Had to help
restore that system way too many time.  Ick.  Plus
it wouldn't run some stuff that worked on 98.

   3.11, maybe 95, 98, 2000, XP, if needed.

Steve N.
Logged
dedndave
Member
*****
Posts: 12523


Re: OS Info Dump
« Reply #56 on: August 01, 2009, 02:29:01 PM »

i would be interested in 3.1, Steve - out of curiosity

thanks UtillMasm - good to see a server run
if you would like an explaination of the Suite Mask pins...
http://msdn.microsoft.com/en-us/library/ms724833(VS.85).aspx
Logged
sinsi
Member
*****
Gender: Male
Posts: 1758


RIP Bodie 1999-2011


Re: OS Info Dump
« Reply #57 on: August 01, 2009, 10:34:02 PM »

Tried it in win311 with win32s, but it crashed windows - actually it rebooted the system. I got a flash of an error message from emm386 but couldn't see it.

edit: sorry, that was the old version. The new version doesn't work  Sad but doesn't crash win311  BigGrin

Here are the screenshots of the errors.

[attachment deleted by admin]
Logged

Light travels faster than sound, that's why some people seem bright until you hear them.
dedndave
Member
*****
Posts: 12523


Re: OS Info Dump
« Reply #58 on: August 01, 2009, 11:43:00 PM »

thanks again sinsi - lol
i didn't expect it to work, actually
if i knew how to detect win3 early, i would avoid making the GetVersionEx call or, at least, get the structure size right
Logged
dedndave
Member
*****
Posts: 12523


Re: OS Info Dump
« Reply #59 on: August 02, 2009, 12:50:13 AM »

i found the following 3 tables for older OS's, and for media center\ident

Windows 95 retail, OEM     4.00.950                     7/11/95
Windows 95 retail SP1      4.00.950A                    7/11/95-12/31/95
OEM Service Release 2      4.00.1111* (4.00.950B)       8/24/96
OEM Service Release 2.1    4.03.1212-1214* (4.00.950B)  8/24/96-8/27/97 
OEM Service Release 2.5    4.03.1214* (4.00.950C)       8/24/96-11/18/97
Windows 98 retail, OEM     4.10.1998                    5/11/98
Windows 98, Security CD    4.10.1998A
Windows 98 Second Edition  4.10.2222A                   4/23/99
Windows 98 SE Security CD  4.10.2222B
Windows Me                 4.90.3000                    6/08/00
Windows Me Security CD     4.90.3000A
-------------------------------------------------------------------------------------------
   dwPlatformID dwMajorVersion dwMinorVersion dwBuildNumber
95       1             4              0            950
95 SP1   1             4              0      > 950 && <= 1080
95 OSR2  1             4            < 10         > 1080
98       1             4             10           1998
98 SP1   1             4             10      > 1998 && < 2183
98 SE    1             4             10         >= 2183
Me       1             4             90           3000
 
NT 3.51  2             3             51           1057
NT 4     2             4              0           1381
2000     2             5              0           2195
XP       2             5              1   

CE 1.0   3             1              0   
CE 2.0   3             2              0   
CE 2.1   3             2              1   
CE 3.0   3             3              0   
-------------------------------------------------------------------------------------------
Ident value v.s Windows Media Center version

< 2.7 = Windows XP Media Center Edition 2002
2.7 or 2.8 = Windows XP Media Center Edition 2004
3.0 = Windows XP Media Center Edition 2005
3.1 = Windows XP Media Center Edition 2005 with Update Rollup 1
4.0 = Windows XP Media Center Edition 2005 with Update Rollup 2
5.0 = Windows Vista
5.1 = Windows Vista with Media Center TV Pack 2008
6.0 = Windows 7
Logged
Pages: 1 2 3 [4] 5 6 Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP The MASM Forum Archive 2004 to 2012 | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!