PatchPE
Published by on Friday, August 8, 2025
Introduction
PatchPE is a patcher for PE executable headers, that could make them compatible with older versions of Windows. Additionaly it enables LAA (Large Address Aware) attribute to the EXE, so it can take advantage of allocating more than 2 GB. of physical memory.
Recent linkers, use to add latest versions on the headers, so, you can find programs that are marked to work only on Windows 10, but once patched, they can work in Windows XP, or even 2000 or NT.
In some circumnstances, the program itself will use features not available in older Windows versions, and thus, the resulting patched executable will not completely work, or not at all.
Usage
PatchPE.exe <File>
Examples:
PatchPE.exe notepad.exe
Technical details
PatchPE, simply alters the fields on the PE header over MajorOperatingSystemVersion, MinorOperatingSystemVersion, MajorSubsystemVersion and MinorSubsystemVersion to make them compatible with Windows NT 4.0 or later.
Sponsors
Download
- Win32 and Win64 binaries and Visual C++ 2019 source code (147 Kb. in ZIP format).
History
1.36 - 2025/08/08
- Minor code optimizations and cleanup.
- Upgraded to Visual C++ 17.4.
1.35 - 2022/04/10
- Prevent leak of pFile on errors.
1.34 - 2022/04/10
- Upgraded to Visual C++ 2022.
1.33 - 2020/11/28
- Reverted stripped EXE headers because they are incompatible with DOSBox (Valentine).
1.32 - 2020/11/23
- Forgot to patch 32 bit version with itself (Valentine).
- Stripped EXE headers to reduce size.
1.31 - 2019/05/05
- Upgraded to Visual C++ 2019.
1.30 - 2018/03/09
- Added support for Aggressively trim the working set same as /WS (IMAGE_FILE_AGGRESIVE_WS_TRIM).
- Distribution size slightly reduced.
1.20 - 2017/07/23
- Added support for Large Address Aware (LAA) to enable 32 bit applications use more than 3GB of memory same as /LARGEADDRESSAWARE (IMAGE_FILE_LARGE_ADDRESS_AWARE).
- Enabled aggressive trimming same as /WS:AGGRESSIVE (IMAGE_FILE_AGGRESIVE_WS_TRIM).
- File size slightly reduced.
1.10 - 2017/03/09
- Added more error controls.
- Improved error messages.
- Upgraded to Visual C++ 2017.
1.00 - 2017/03/08
- Initial public version
Links
- Official PatcPE's website: nikkhokkho.sourceforge.net/static.php?page=PatchPE.
- Official author's website: www.javiergutierrezchamorro.com.