Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application does not work when installed with Inno Setup

I am developing desktop database application. Using rdlc report and reportviewer. Everything was fine in developing process, reportviewer was showing all data smoothly. I deploy app with Inno Setup. But when I install the app, the reportviewer is not showing data. While data is correctly inserted in the tables.

like image 631
Adnan Avatar asked Jun 02 '17 16:06

Adnan


People also ask

How do I make an inno file executable?

Go to Menu, Project, then Compile to compile and create the setup file. This will create a complete installer. Run the Setup and your application will be installed correctly. Innosetup offers an awesome alternative to create great looking Installers for free.

Can Inno Setup create MSI?

Create MSI with Inno Setup. The MSI Wrapper was produced to create MSI packages from executable files built with Inno Setup. It puts the setup.exe inside an MSI file and runs it with the specified command line switches when the MSI package is installed.

What does Inno Setup do?

Inno Setup is an open source script-driven installation system created in Delphi by Jordan Russell. The first version was released in 1997. Since Jordan Russell wasn't satisfied with InstallShield Express which he had received upon purchase of Borland Delphi, he decided to make his own installer.


1 Answers

For applications that work incorrectly or fail completely, when installed by Inno Setup to Program Files folder, the first thing to test, is to try to deploy the application manually to the same folder.


If the application fails even after a manual deployment, the most usual problem is that the application requires a user to have write permissions to application folder. As on modern versions of Windows a user typically does not have write permissions to the Program Files folder, the application does not work. So the problem usually has nothing to do with Inno Setup, but it's a problem of the application itself.

To solve the problem:

  • The best solution is to redesign the application so that it does not require write permissions to its folder. Windows applications should not require write permissions to their folder. That's against Windows guidelines. The application should write data to a user profile folder (C:\Users\username\AppData) or to a common data folder (C:\ProgramData).
  • A dirty workaround is have the installer grant a user(s) write permissions to the installation folder. Do that only, if you cannot get the application fixed (e.g. it's 3rd party application).
    See Inno Setup - How to set permissions of installation folder.
  • Even more gross workaround is to configure the application to be executed with elevated (Administrator) privileges.
    See Inno Setup desktop shortcut (link) which has "Run as administrator" advanced property set or How to set 'Run as administrator' on a file using Inno Setup.
  • Another solution is enabling legacy compatibility mode that makes Windows redirect all application write attempts to a virtual store. See also Application installed with Inno Setup writes files to unknown location instead of its installation folder.

There are numerous other possible reasons, why the application might be failing when installed, including:

  • You omitted some dependency:

    • DLL library
    • .NET assembly
    • .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.
  • The application is not designed to be executed from a folder that has a space in its name (Program Files).

  • The application gets confused by Windows File virtualization (though it's unlikely). See Application installed with Inno Setup writes files to unknown location instead of its installation folder.

like image 100
Martin Prikryl Avatar answered Oct 04 '22 23:10

Martin Prikryl