I'm trying to update the manifest included in a Visual FoxPro app with some registry free COM entries. A compiled FoxPro exe appears to contain a VFP runtime along with with some string resources and a default manifest, as well as the pre-compiled app code appended to the end of the exe. When using mt.exe -manifest app.manifest -outputresource:app.exe;#1
the resulting exe is truncated. The manifest is placed at the end of the exe and all the pre-compiled app code is simply removed. Is there a way to update the embedded manifest using mt.exe without removing the app code from the exe, which is normally appended after the manifest?
I've found two alternatives that do NOT work for me. I'm forced to compile the exe with VFP 8, due to code incompatibility with VFP 9.
- An article written by Rick Strahl https://www.west-wind.com/wconnect/weblog/ShowEntry.blog?id=890 that assumes the app is compiled using FoxPro 9 SP 2, which isn't an option for me.
- A project hook class that assumes the app is compiled in VFP 9 https://www.sweetpotatosoftware.com/blog/index.php/2009/08/03/apply-application-manifest-at-compile-time-with-projecthook/ This is kind of close, but compiling with VFP 9 is not an option for me.
I'm hoping mt.exe provides a better alternative than building my own app to update the manifest in a VFP 8 exe.
resourceHacker does a good job of modifying a vfp exe. I have replaced and deleted manifests in vfp8 executables. vfp9 seemed to include the ability to embed custom manifests during the build process.