Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

Converting Executables

Yaroslav Kibysh edited this page Jun 26, 2019 · 7 revisions

In order to run Windows CE executables in Win32 environment (detailed here) you have to convert executable and related libraries by changing subsystem number to Win32 GUI

The list of tools to change subsystem

SubsystemTool

  • Part of Windows CE Compatibility Layer (our own tool)
  • Works on Windows XP
  • Written in C++, compiles with Visual Studio 2017
  • Based on setsubsys code
  • Supports directories and different subsystems
  • Source code, Binaries
  • Usage:
    • SubsystemTool [path] [subsystem number/name (optional)]
    • path can be directory or single file
    • subsystem can be wince, win32gui, win32cui or any number
    • shows output with previous value and new

setsubsys

  • Compiles with PBCC 6, uses Win32 API
  • Source code & compiled (mega.nz)
  • Usage:
    • setsubsys.exe [portable executable path]
    • converts any subsystem to Win32
    • and Win32 GUI to Win32 CUI

Additional: subsystem constants

Constant Name Value Description
IMAGE_SUBSYSTEM_UNKNOWN 0 Unknown subsystem
IMAGE_SUBSYSTEM_NATIVE 1 No subsystem required (device drivers and native system processes)
IMAGE_SUBSYSTEM_WINDOWS_GUI 2 Windows GUI subsystem
IMAGE_SUBSYSTEM_WINDOWS_CUI 3 Windows CUI (console) subsystem
IMAGE_SUBSYSTEM_OS2_CUI 5 OS/2 CUI (console) subsystem
IMAGE_SUBSYSTEM_POSIX_CUI 7 POSIX CUI (console) subsystem
IMAGE_SUBSYSTEM_WINDOWS_CE_GUI 9 Windows CE GUI subsystem
IMAGE_SUBSYSTEM_EFI_APPLICATION 10 EFI application
IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11 EFI driver with boot services
IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12 EFI driver with run-time services
IMAGE_SUBSYSTEM_EFI_ROM 13 EFI ROM image
IMAGE_SUBSYSTEM_XBOX 14 Xbox subsystem
IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION 16 Windows boot application

Clone this wiki locally