Re: HAY Herbert, wanna write a legal PE executable ?



Jim Carlock wrote:

Currently I only have Win98, XP has to wait till Monday.
But you can ignore anything before gver.exe (the purpose
of the batch and gver.com is only to generate the Win32
binary gver.exe and the content of this binary file
is independent from the used OS version).

And to run gver.exe you don't even need cmd.exe (delete
cmd.exe) and you still can start gver.exe by double click
in Windows Explorer.

Here the output you should get according the Windows
documentation:

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
For DOS:

dwPlatformId=ffffffff


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
FOR Windows:


dwMajorVersion
--------------
Major version number of the operating system. This member can be one of
the following values.

Operating System Meaning
Windows 95 4
Windows 98 4
Windows Me 4
Windows NT 3.51 3
Windows NT 4.0 4
Windows 2000 5
Windows XP 5
Windows Server 2003 family 5

dwMinorVersion
--------------
Minor version number of the operating system. This member can be one of
the following values.

Operating System Meaning
Windows 95 0
Windows 98 10
Windows Me 90
Windows NT 3.51 51
Windows NT 4.0 0
Windows 2000 0
Windows XP 1
Windows Server 2003 family 2


dwBuildNumber
-------------
Build number of the operating system.

Windows Me/98/95: The low-order word contains the build number of the
operating system. The high-order word contains the major
and minor version numbers.

dwPlatformId
------------
Operating system platform. This member can be one of the following values.

Value Meaning
0 VER_PLATFORM_WIN32s Win32s on Windows 3.1.
1 VER_PLATFORM_WIN32_WINDOWS Windows 95, Windows 98, or Windows Me.
2 VER_PLATFORM_WIN32_NT Windows NT, Windows 2000, Windows XP,
or Windows Server 2003 family.

szCSDVersion
------------
Pointer to a null-terminated string, such as "Service Pack 3", that
indicates the latest Service Pack installed on the system. If no Service
Pack has been installed, the string is empty.

Windows Me/98/95: Pointer to a null-terminated string that indicates
additional version information. For example, " C"
indicates Windows 95 OSR2 and " A" indicates Windows 98
Second Edition.


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::



On XP32 I ended up with (Win95 Compatibility Mode):

C:\tmp\klee>gver.exe
set ver_major=00000004
set ver_minor=00000000
set ver_build=000003b6
set ver_platf=00000001
set ver_csd=

Windows XP (Windows NT 4 Service Pack 5 Compatibility Mode)
reports:

C:\tmp\klee>gver.exe
set ver_major=00000004
set ver_minor=00000000
set ver_build=00000565
set ver_platf=00000002
set ver_csd=Service Pack 5

And for a regular cmd.exe (no compatibility selected) prompt:

C:\tmp\klee>gver.exe
set ver_major=00000005
set ver_minor=00000001
set ver_build=00000a28
set ver_platf=00000002
set ver_csd=Service Pack 2

Also, note that if you right-click upon cmd.exe in the
%systemroot%\system32 folder, then click on the Compatibility
tab, you should see that you can not change the Compatibility
mode there. That's why I copied it to another folder. I just
checked to see if the name change is required, but it's not,
so I changed the name to make things here easier to understand.

Hope this more accurately describes everything.

--
Jim Carlock
North Carolina Swimming Pool Builders
http://www.aquaticcreationsnc.com/
.



Relevant Pages

  • Re: Installing old programs in Windows XP
    ... XP is not in the list because the operating system is XP!!!! ... you use Win 98 compatibility mode.. ... MS-MVP Windows Shell/User ... so I was unable to install the program. ...
    (microsoft.public.windowsxp.basics)
  • Re: Simple table of Office products compatible with Windows XP SP2
    ... Windows SP2, and which security changes would have these effects? ... > as they're currently in the support cycle. ... > Office products are compatible with Windows XP Service Pack 2. ... > have to look a little harder for compatibility information from other ...
    (microsoft.public.office.misc)
  • Re: 2 problems: SP3 & sysfader...
    ... able receiving security updates/patches for your WinXP operating system. ... Steps to take before you install Windows XP Service Pack 3 ... Windows XP Service Pack 3 Overview ...
    (microsoft.public.windowsxp.general)
  • RE: Administrative Templates: Windows 2003 SP1 or Windows XP SP2 ?
    ... Each operating system or service pack release includes a superset of the ... the ADM files that are provided with Windows Server ...
    (microsoft.public.windows.group_policy)
  • RE: System Restore wont work
    ... corruption is preventing you from being able to use sytem restore. ... service pack 2 for Windows XP is almost half as large as the operating system ... do a complete reinstall of Windows XP from CD. ...
    (microsoft.public.windowsxp.general)