【问题标题】:Inno Setup: Application won't startInno Setup:应用程序无法启动
【发布时间】:2017-09-09 02:52:02
【问题描述】:

我有一个 Visual Studio 程序,我为使用 Inno Setup 创建了一个安装程序。然后我在尝试打开应用程序时遇到了一些错误,例如缺少我添加到项目目录中的 .dll。然后我收到一个错误,例如“程序入口点无法位于动态链接库 PvBuffer.dll 中”,我通过将 PvBuffer.dll 添加到项目目录来修复该错误。

现在,当我制作安装程序并尝试运行已安装的应用程序时,没有任何反应。我点击应用程序,程序就崩溃了。没有错误,什么都没有。发布 .exe 文件在项目中工作正常,但安装的应用程序不能。关于可能导致这种情况的任何建议?谢谢

编辑 1: 这里是我的安装脚本:

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{AFC14F65-6DD7-479B-AA27-C15F14763641}
AppName=FLIR615
AppVersion=1.5
;AppVerName=FLIR615 1.5
AppPublisher=My Company, Inc.
AppPublisherURL=http://www.example.com/
AppSupportURL=http://www.example.com/
AppUpdatesURL=http://www.example.com/
DefaultDirName={pf}\FLIR615
DefaultGroupName=FLIR615
AllowNoIcons=yes
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1

[Files]
Source: "D:\FLIR Project\FLIR Project\GEVPlayerSample\SampleRelease\GEVPlayerSample.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\FLIR Project\FLIR Project\GEVPlayerSample\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}\FLIR615"; Filename: "{app}\GEVPlayerSample.exe"
Name: "{group}\{cm:ProgramOnTheWeb,FLIR615}"; Filename: "http://www.example.com/"
Name: "{group}\{cm:UninstallProgram,FLIR615}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\FLIR615"; Filename: "{app}\GEVPlayerSample.exe"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\FLIR615"; Filename: "{app}\GEVPlayerSample.exe"; Tasks: quicklaunchicon

[Run]
Filename: "{app}\GEVPlayerSample.exe"; Description: "{cm:LaunchProgram,FLIR615}"; Flags: nowait postinstall skipifsilent

编辑 2 KirbyFan64SOS 以下是依赖 walker 中的错误:

编辑 3 在事件查看器中监控崩溃后,我注意到我在下面发布了一些错误

链接到崩溃程序的错误似乎与 KERNALBASE.dll 有关。有谁知道这是什么意思?

【问题讨论】:

  • 如果从命令提示符运行程序,然后输入echo %ERRORLEVEL%,输出是什么?
  • 你能粘贴你的安装脚本吗?
  • @Slappy 我已经添加了我的安装脚本
  • @kirbyfan64sos 错误级别为 0。我注意到的一件事是,当我打开已安装程序的目录时,文件夹中仍然有 Visual Studio 项目文件。它应该有吗?
  • 我还发现程序需要某些 .dll 才能运行,否则会出错,但是当 .dll 与 .exe 文件位于同一目录中时不工作

标签: visual-studio crash inno-setup


【解决方案1】:

我遇到了同样的问题,原因是没有 dll。正确的 dll(连同 32/64 位)和准确的版本非常重要。

【讨论】:

    最近更新 更多