0
votes

I have a Python script that reads an excel spreadsheet. It does so only if the spreadsheet is in the same folder as the script.

Now, when I use py2exe to convert the script to .exe and then copy my .xls file to the dist folder it creates and where the .exe file is, it runs fine. But, when I use InnoSetup to make an installer, and then I copy my .xls file to the program files folder where the main executable is, the program doesn't find my .xls file anymore, even though the .exe and .xls are in the same folder.

What might be the problem?

1
InnoSetup doesn't hurt your files. Look for solution related to your application (this is for 99.9% not InnoSetup related). Optionally post your InnoSetup script and describe, which file you need, and where. - TLama

1 Answers

0
votes

Your question is not really related with Inno Setup.

My guess is:

  • you're creating a shortcut icon for your exe program in the installer,
  • your program doesn't really open the excel file located in the exe directory, but in the working directory of the application.
  • the Icon entry is specifying the wrong WorkingDir parameter.

To fix your installer, change your [icon] entry, specify the correct WorkingDir or leave it blank and, according to the documentation, the installer will try to use the path of the Filename parameter, for example:

[Icons]
Name: "{group}\My Program"; Filename: "{app}\MYPROG.EXE"; WorkingDir: "{app}"