1

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?

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
kneedhelp
  • 555
  • 4
  • 18
  • It's not clear from the question.. Do the images appear at all in the broken EXE? I suspect this is in how the images are accessed and loaded. Show the code for loading one of the images that fails.. – Andrew Thompson Jan 28 '16 at 09:13
  • I figured it out, I guess I was using the program wrong. Should I answer my question? – kneedhelp Jan 28 '16 at 10:35

2 Answers2

1

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.
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
  • Is there a way I could tell which problem it is? I didn't use any other files when using Inno Setup, do I need a .dll file or something? – kneedhelp Jan 28 '16 at 06:54
  • I do not do Java or Swing, so I cannot help specifically for your problem. – Martin Prikryl Jan 28 '16 at 07:04
  • Is there some kind of file that needs to be added no matter what language it is? Like an .ini file, or something else common to all other applications? – kneedhelp Jan 28 '16 at 07:07
  • 1
    No. There's no common file. Only application-specific files. – Martin Prikryl Jan 28 '16 at 07:09
  • Wait but if it doesn't change the .exe in any way I don't understand why it doesn't work. The images I think are part of the exe, I don't have any other files that the program uses. The only thing I'm looking to install is the .exe. What could change is that process to make it not work? – kneedhelp Jan 28 '16 at 07:32
  • 1
    I have no idea how the `JButtons` work. So I cannot answer that. Maybe the images are in some special format that needs some non-standard library to decode. But that's just a wild guess. – Martin Prikryl Jan 28 '16 at 07:37
0

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

kneedhelp
  • 555
  • 4
  • 18
  • That does not really make sense. – Martin Prikryl Jan 28 '16 at 18:24
  • Doesn't make sense how it worked or I did not explain it well enough? – kneedhelp Jan 29 '16 at 01:35
  • How it worked. It makes no difference where the source file is stored. – Martin Prikryl Jan 29 '16 at 07:58
  • Yeah it was very strange, but it worked. The first time I tried it (where it produced the behavior in my question) it was in my documents folder, and didn't work (I tried it multiple times). Then I moved it to the folder Inno Setup defaults to and it worked (first try). Couldn't tell you why though – kneedhelp Jan 29 '16 at 13:05