WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

System Information

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Determine whether a program is 16 or 32 bit


Determine whether an EXE is 16 or 32 bit

Answer:

Use the ExeTypeInfo Function
a=ExeTypeInfo(FileLocate("notepad.exe"))
Switch a
   Case 0
      b="Not an EXE file"
      Break
   Case 1
      b="Old DOS EXE"
      Break
   Case 2
      b="New DOS EXE"
      Break
   Case 3
      b="Windows EXE"
      Break
   Case 10
      b="Windows NT EXE"
      Break

   Case 20            b="Windows 64-bit EXE"            Break
   Case a
      b="Unknown file type, value = %a%"
      Break
EndSwitch
Message("File Type", b)

Article ID:   W17426
File Created: 2008:04:10:15:09:50
Last Updated: 2008:04:10:15:09:50