问题描述
我正在尝试使用NSIS安装程序以静默模式安装VC_redist.x64_v14.27.29016.0.exe,且不进行任何交互.这是代码:
I am trying to install VC_redist.x64_v14.27.29016.0.exe using NSIS installer in silent mode with no interaction.This is the code:
nsExec::ExecToStack 'VC_redist.x64_v14.27.29016.0.exe /install /quiet /norestart'
pop $0
pop $1
我正在使用ExecToStack来获取退出代码.
I am using ExecToStack in order to get the exit code.
我的问题是:我是否可以确定nsExec :: ExecToStack一直等到进程退出,然后返回退出代码? ExecWait 和 nsExec :: ExecToStack ??
My question is:Can I be sure that nsExec::ExecToStack waits till the process exits and then returns the exit code? Is there a difference between ExecWait and nsExec::ExecToStack??
我想知道vcredist可执行文件是否已成功安装,然后再进行其余的安装.
I want to know if the vcredist executable is installed successfully before proceed with the rest of my installation.
推荐答案
是的,nsExec插件将等待子进程.但是,它将不会等待孙辈超过其父进程.
Yes, the nsExec plug-in will wait for the child process. It will however not wait for grandchildren that outlives its parent process.
nsExec是为控制台应用程序设计的,您可能应该只使用 ExecWait
.
nsExec is designed for console applications, you should probably just use ExecWait
.
ExecWait '"$temp\redist.exe" /something /whatever' $0
DetailPrint "Exit code is $0"
这篇关于nsExec :: ExecToStack是否正在等待过程完成?(NSIS)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!