Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

OEM Version String

saharovmsaharovm Member Posts: 8
Merry X-Mas!

I have one simple question. We know how to determine the MS-DOS version,
revision, user id and allocation using AX=3000/3306/INT 21 functions. But
MS-DOS also has an OEM version string contained in COMMAND.COM. We could
see it typing "VER" at the command prompt. For example, Windows 95 OSR2
gives us "Windows 95. [Version 4.00.1111]".

My Q is: how to get it programmatically?

Mike Saharov, saharovm@mtu-net.ru

Comments

  • alan_pollockalan_pollock Member Posts: 110
    : Merry X-Mas!
    :
    : I have one simple question. We know how to determine the MS-DOS version,
    : revision, user id and allocation using AX=3000/3306/INT 21 functions. But
    : MS-DOS also has an OEM version string contained in COMMAND.COM. We could
    : see it typing "VER" at the command prompt. For example, Windows 95 OSR2
    : gives us "Windows 95. [Version 4.00.1111]".
    :
    : My Q is: how to get it programmatically?
    :
    : Mike Saharov, saharovm@mtu-net.ru


    Somewhere Microsoft has documentation on OEM version field length, for which you'll need to make a visit to MS and hunt for it. As for extracting it, COMMAND.COM is a file just like any other file... you can open it in read-only mode and read/extract "n" number of bytes from the begining offset of where the OEM version is. It's location should be constant in all versions of COMMAND.COM, and good hex editor can be used to find this offset.

    Alan

    :
    :

  • beyondsocietybeyondsociety Member Posts: 14
    If you want to change it, get a program called hexedit that will let you change what it says for the program command.com or io.sys file.

    IF your using it in a assembly program, check out the DOS Parameter Block which contains the OEM string and all the FAT stuff.

    Hope this helps!
  • blipblip Member Posts: 756
    You could also point DS:SI to the following string format: the first byte is the length including the terminating CR, x bytes for command, terminating CR. Then call INT 2Eh, all registers are destroyed including SS:SP. So just do this and read what's printed either by hooking DOS or doing some redirection:
    [code]
    ;Assemble with NASM into a .COM file.
    pusha
    pushf
    push ds
    push es
    mov [SSandSP],sp
    mov si,VerCmd
    mov [SSandSP+2],ss
    int 2Eh
    lss sp,[SSandSP]
    pop es
    pop ds
    popf
    popa
    ;...
    VerCmd db 4,"ver",13
    [/code]
Sign In or Register to comment.