Author Topic: Set subsystem tool for 32 bit PE files.  (Read 861 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5945
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Set subsystem tool for 32 bit PE files.
« on: May 07, 2018, 08:57:26 PM »
Full source for a UI version of a simple tool that sets the subsystem for a 32 bit PE file.

No trolls, just code.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5945
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Set subsystem tool for 32 bit PE files.
« Reply #1 on: May 11, 2018, 08:49:25 AM »
Full source for a console version to set the subsystem of a valid 32 bit PE executable. This can be used in a batch file to build an executable file from a compiler that only builds UI type executables. It will work on any valid 32 bit PE executable.

No trolls, just code.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5945
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Set subsystem tool for 32 bit PE files.
« Reply #2 on: May 15, 2018, 05:28:22 PM »
For those with a sense of humour, unintended consequences made these two tools work just fine with 64 bit MASM executables as it appears that the DOS and NT header structures are much the same. I had never tested it until today and while I have not tested it on any other 64 bit PE file apart from those built with ML64, they will probably work with them as well.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin: