This question already has an answer here:
I don't know what the issue is, but for some reason my .exe file and the .exe file that I get after running the installer from Inno Setup are not the same.
No error codes thrown or anything, it compiles perfectly, but the toolbars in my application (the program was made with Java swing) do not contain their buttons correctly. I have two JToolBars that hold JButtons (each button has an image). When I used Launch4j to wrap my program into an exe it worked perfectly, but when I run the exe I get after using Inno Setup, those toolbars don't hold the buttons right. They have shrunk down to a much smaller size, and the buttons are really small, maybe 2px x 2px. They also can't be seen unless hovered over. Why would the exe from Inno Setup be any different from the original one?
The Inno Setup does not modify the installed EXE files in any way.
If the application is failing when installed, it's not Inno Setup's fault per se, it's rather fault in the deployment process.
Possible reasons why the installed application is failing are numerous, including, but not limited to:
- You omitted some dependency
- DLL library
- .NET Framework
- Java Runtime Environment
- other runtime
- COM/ActiveX object, etc.
- The application requires some configuration
- a file
- a registry key [including COM/ActiveX object registration]
- an environment variable, etc.
- Some applications require a write access to their folder. As Inno Setup installs the application to "Program Files" folder by default, where write access is restricted, such applications fail.
If anyone wants to know how I solved it, I just moved the .exe to the installer's directory, and when it prompts you to add your .exe in Inno Setup, it should be in the directory that it opens to by default. Not sure why that worked (or if that's a requirement for the program), but it worked for me
来源:https://stackoverflow.com/questions/35050255/difference-between-exe-and-the-exe-returned-from-inno-setup-installed-applic