Application does not work when installed with Inno Setup
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.