简体   繁体   English

InnoSetup:如何在安装 32 位应用程序时运行 64 位安装程序,但未找到文件

[英]InnoSetup: How do I Run a 64bit Installer while installing a 32 bit application, getting File not found

I am using InnoSetup to install a 32 bit desktop application and in the Run section I am launching the 64bit Firebird installer.我正在使用 InnoSetup 安装 32 位桌面应用程序,并在运行部分中启动 64 位 Firebird 安装程序。 I am working in Win10.我在Win10下工作。

But no matter what I have tried doing, I get an error message saying it cannot be run and that the file cannot be found, Error 2.但是无论我尝试做什么,我都会收到一条错误消息,说它无法运行并且找不到文件,错误 2。

The FB3.0 installer file is visible in the Explorer and can launched via the explorer just fine. FB3.0 安装程序文件在资源管理器中可见,可以通过资源管理器启动就好了。 The 32 bit Firebird installer launches fine with my app's installation. 32 位 Firebird 安装程序在安装我的应用程序时可以正常启动。

I have been using {tmp} directory and did try other directories, including C:\\Temp.我一直在使用 {tmp} 目录并尝试过其他目录,包括 C:\\Temp。 Nothing worked.没有任何效果。

I have PrivilegesRequired=admin and tried ArchitecturesInstallIn64BitMode=x64 ia64.我有 PrivilegesRequired=admin 并尝试了 ArchitecturesInstallIn64BitMode=x64 ia64。 That did not work.那没有用。 I tried making sure that I manually select "run as admin" when launching the installer.我尝试确保在启动安装程序时手动选择“以管理员身份运行”。

Flags include "Flags: runascurrentuser waituntilterminated postinstall 64bit" for the Firebird installer in Run section.标志包括“标志:runascurrentuser waituntilterminated postinstall 64bit”,用于运行部分中的 Firebird 安装程序。

I tried using Exec() in the BeforeInstall of the launch of my app, but that gave the same error message.我尝试在我的应用程序启动的 BeforeInstall 中使用 Exec() ,但这给出了相同的错误消息。

In InnoSetup Help under, "64-bit Installation Limitations" It says:在 InnoSetup 帮助下,“64 位安装限制”它说:

"You cannot load/use 64-bit DLLs in the [Code] section, because Windows does not allow 32-bit processes to load 64-bit DLLs (and vice versa). A 32-bit process can, however, launch 64-bit EXEs. Use the Exec function or the [Run] section to do that." “您不能在 [代码] 部分加载/使用 64 位 DLL,因为 Windows 不允许 32 位进程加载 64 位 DLL(反之亦然)。但是,32 位进程可以启动 64-位 EXE。使用 Exec 函数或 [Run] 部分来做到这一点。”

Thus, I am still thinking I am missing something.因此,我仍然认为我错过了一些东西。

During a test run of an installer that just tried to launch FB3.0 installer, 64 bit, initially that would not run either with the same error, but once I explicitly added PrivilegesRequired=admin, that worked.在刚刚尝试启动 64 位 FB3.0 安装程序的安装程序的测试运行期间,最初它不会以相同的错误运行,但是一旦我明确添加了 PrivilegesRequired=admin,就可以了。 Alternatively, in InnoScript, tools: options: general;或者,在 InnoScript 中,工具:选项:一般; check run as admin (which does not set the PrivilegesRequired=admin, btw, not sure where it is reflected in the script.)检查以管理员身份运行(它没有设置 PrivilegesRequired=admin,顺便说一句,不确定它在脚本中的反映。)

Anyway, as soon as I included my app's installation (32bit), back came the error above.无论如何,只要我包含了我的应用程序的安装(32 位),就会出现上面的错误。

Any ideas on how I can run the 64 bit installer in Inno with my 32 bit app installation?关于如何使用 32 位应用程序安装在 Inno 中运行 64 位安装程序的任何想法?

Thank you!谢谢!

I was able to create an installer which loaded/ran a simple application and launch the Firebird 3.0 x64 installer without any errors.我能够创建一个安装程序,它加载/运行一个简单的应用程序并启动 Firebird 3.0 x64 安装程序而没有任何错误。

From that I eventually discovered that the command line parameters for Firebird 3,0 were causing this issue, even though the params were taken right from the manual.从那以后,我最终发现 Firebird 3,0 的命令行参数导致了这个问题,即使这些参数是直接从手册中获取的。

The parameter causing the error was: /COMPONENTS="ServerComponent\\SuperServerComponent,ServerComponent,DevAdminComponent,ClientComponent" following this is /TASKS="comma separated list of task names" which in my case includes /TASKS=""UseSuperServerTask\\UseGuardianTask, et al...导致错误的参数是: /COMPONENTS="ServerComponent\\SuperServerComponent,ServerComponent,DevAdminComponent,ClientComponent" 后面是 /TASKS="逗号分隔的任务名称列表",在我的例子中包括 /TASKS=""UseSuperServerTask\\UseGuardianTask, et阿尔...

I had to remove "ServerComponent\\SuperServerComponent" from the parameter list.我不得不从参数列表中删除“ServerComponent\\SuperServerComponent”。 I am not sure that SuperServer is properly setup this way, but the Firebird 3.0 x64 installer does run properly from within my application installer now.我不确定 SuperServer 是否以这种方式正确设置,但是 Firebird 3.0 x64 安装程序现在可以在我的应用程序安装程序中正常运行。

In any case, I use a separate firebird.conf file which is copied into the Firebird directory after firebird is installed and this sets the super server.无论如何,我使用单独的 firebird.conf 文件,在安装 firebird 后将其复制到 Firebird 目录中,这将设置超级服务器。 Thank you for your response, Martin.谢谢你的回复,马丁。

I suppose an additional flag for this post should include "Firebird" Not sure how to add flags after posting.我想这篇文章的附加标志应该包括“Firebird”不知道发布后如何添加标志。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM