32位NSIS可以启动64位程序吗?
我正在从 32 -> 移植 Windows 程序64 位。它有一个使用 NSIS 编写的 32 位安装程序。我可以使用 32 位 NSIS 安装程序启动我的新 64 位 exe 之一吗?我认为 NSIS 没有 64 位版本...
I'm porting a windows program from 32 -> 64 bit. It has a 32 bit installer which is written using NSIS. Can I launch one of my new 64 bit exes using the 32 bit NSIS installer? I don't think there is a 64 bit version of NSIS...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
当然可以,NSIS 不会施加任何限制,NSIS 的真正妙处在于,如果您同时拥有 32 位和 64 位版本的应用程序,您可以执行组合安装程序,并在每个体系结构的基础上安装所需的文件。例如
Sure you can, NSIS doesn't impose any restrictions and what's really nifty about NSIS is if you have both 32 and 64 bit versions of your app, you can do a combined installer, and install the required files on a per-architecture basis. e.g.
NSIS 使用两个 Win32 API 来执行进程
ShellExecute
(通过
ExecShell
) 和CreateProcess
(通过Exec
和ExecWait
),两者都可以运行64位进程(x64) 来自 NSIS 32 位进程(只要您在 64 位操作系统上运行)。NSIS uses two Win32 APIs to execute processes
ShellExecute
(thruExecShell
) andCreateProcess
(thruExec
andExecWait
), both of them can run 64 bit process (x64) from NSIS 32 bit process (as long as you're running on 64 bit OS).对于需要 64 位操作的执行进程,我发现默认的 NSIS 执行不会自动在 64 位模式下运行。我在尝试运行 DISM 来安装 .NET Framework 3.5 时遇到了此问题。 DISM 会出错并指出:
我添加了需要在需要 64 位操作的调用之前添加
DisableX64FSRedirection
。请参阅下面的示例:For executing processes needing 64-bit operation I found the default NSIS execution would not automatically run in 64-bit mode. I encountered this when trying to run DISM to install .NET Framework 3.5. DISM would error out stating:
To resolve I added needed to add
DisableX64FSRedirection
before the call that needs 64-bit operation. See below for example:只是为了添加更多描述性
看看,
http://www.autoitscript.com/forum/index.php?showtopic= 44048
just to add more descriptive
have a look,
http://www.autoitscript.com/forum/index.php?showtopic=44048
启动 64 位 PowerShell 窗口并从 32 位安装程序运行脚本
To launch a 64-bit PowerShell window and run a script from 32-bit setup
嗯..这里有一些限制..例如,尝试运行
odbcconf.exe 安装驱动程序。我一直没能找到一种方法让它以 64 位条目的形式出现。
我认为就像你(在 64 位系统中)以管理员身份启动“powershell x86”,然后从那里运行 cmd 和 odbcconf - 我找不到简单的方法来绕过它,让 odbcconf 执行 x64
Well.. there are some restrictions here.. for instance, try run
odbcconf.exe to install a driver. I have not been able to figure out a way to make that come in as a 64bit entry.
Same way I think as if you (in a 64bit system) start "powershell x86" as admin, then run cmd and odbcconf from there - no easy way to get around it that I can find, making odbcconf do x64