与Inno Setup一起安装时,应用程序无法正常工作 [英] Application does not work when installed with Inno Setup

查看:267
本文介绍了与Inno Setup一起安装时,应用程序无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发桌面数据库应用程序.使用rdlc report和reportviewer.在开发过程中一切都很好,reportviewer流畅地显示了所有数据.我使用Inno Setup部署应用程序.但是,当我安装该应用程序时,reportviewer不会显示数据.在将数据正确插入表中之后.

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.

推荐答案

对于由Inno Setup安装到Program Files文件夹的应用程序,如果它们无法正常运行或完全失败,则首先要尝试部署该应用程序手动移至同一文件夹.

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.

如果即使手动部署后应用程序也失败,则最常见的问题是该应用程序要求用户具有对应用程序文件夹的写权限.与现代Windows版本一样,用户通常没有对Program Files文件夹的写入权限,因此该应用程序无法正常工作.因此,问题通常与Inno Setup无关,但这是应用程序本身的问题.

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.

要解决此问题:

  • 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库
  • .NET程序集
  • .NET Framework
  • Java运行时环境
  • 其他运行时
  • COM/ActiveX对象等

该应用程序需要一些配置:

The application requires some configuration:

  • 文件
  • 注册表项[包括COM/ActiveX对象注册]
  • 环境变量等

该应用程序不能从名称为空格(Program Files)的文件夹中执行.

The application is not designed to be executed from a folder that has a space in its name (Program Files).

Windows File虚拟化使应用程序感到困惑(尽管不太可能).请参见随Inno Setup安装的应用程序会将文件写入未知位置而不是其安装文件夹.

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.

这篇关于与Inno Setup一起安装时,应用程序无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆