使用 NSIS 卸载以前的 Wix 安装程序时需要更长的时间并且应用程序标题栏显示 "Not Responding"
When Uninstalling the previous Wix installer using NSIS it is taking longer time and the application title bar is showing "Not Responding"
我将我的软件从 Wix 安装程序迁移到 NSIS。安装新版本的软件后,我首先需要卸载以前的 Wix 包(如果存在)。
从 NSIS 安装程序中,在 "Welcome" 屏幕中单击 "Next" 时,我正在检查以前的 Wix 包,如果存在则将其卸载。下面是我的代码片段:
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE RemovePrevVerFunction
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_LANGUAGE "English"
Function RemovePrevVerFunction
ReadRegStr $R0 HKLM "SOFTWARE\EMR.01.00" "InstallPath"
${If} $R0 != ""
MessageBox MB_OKCANCEL "EMR 3.01.00 is already installed. Remove the pervious version?" IDOK uninst
Abort
uninst:
ExecWait '"MsiExec.exe" /X{8ED262EE-FC73-47A9-BB86-D92223246881} /qn' ; /x is to uninstall and /qn is to uninstall it silently
${EndIf}
FunctionEnd
使用上面的代码我可以卸载以前的版本。但我还需要做一些事情。
虽然卸载需要更长的时间,欢迎屏幕也变成 "Not Responding" 但最终它完成了卸载过程。
有没有办法卸载它而不变得没有响应?
我想在卸载时显示进度,以便最终用户知道卸载正在进行。为此,我删除了“/qn”(静默卸载),如果我删除“/qn”,它会显示进度,但会弹出一个消息框 "Are you sure you want to uninstall this product?"(可能是来自以前的 wix 安装程序) .有什么办法可以不显示消息框就可以显示进度"Are you sure you want to uninstall this product?"
请帮我解决这个问题。
写/qb!
作为参数。
这应该有效,因为参数 /qb
显示没有模式对话框的基本 UI,另外 /qb!
意味着您无法取消卸载过程。
有关它的更多信息,您可以找到 here .
问候
我将我的软件从 Wix 安装程序迁移到 NSIS。安装新版本的软件后,我首先需要卸载以前的 Wix 包(如果存在)。
从 NSIS 安装程序中,在 "Welcome" 屏幕中单击 "Next" 时,我正在检查以前的 Wix 包,如果存在则将其卸载。下面是我的代码片段:
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE RemovePrevVerFunction
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_LANGUAGE "English"
Function RemovePrevVerFunction
ReadRegStr $R0 HKLM "SOFTWARE\EMR.01.00" "InstallPath"
${If} $R0 != ""
MessageBox MB_OKCANCEL "EMR 3.01.00 is already installed. Remove the pervious version?" IDOK uninst
Abort
uninst:
ExecWait '"MsiExec.exe" /X{8ED262EE-FC73-47A9-BB86-D92223246881} /qn' ; /x is to uninstall and /qn is to uninstall it silently
${EndIf}
FunctionEnd
使用上面的代码我可以卸载以前的版本。但我还需要做一些事情。
虽然卸载需要更长的时间,欢迎屏幕也变成 "Not Responding" 但最终它完成了卸载过程。 有没有办法卸载它而不变得没有响应?
我想在卸载时显示进度,以便最终用户知道卸载正在进行。为此,我删除了“/qn”(静默卸载),如果我删除“/qn”,它会显示进度,但会弹出一个消息框 "Are you sure you want to uninstall this product?"(可能是来自以前的 wix 安装程序) .有什么办法可以不显示消息框就可以显示进度"Are you sure you want to uninstall this product?"
请帮我解决这个问题。
写/qb!
作为参数。
这应该有效,因为参数 /qb
显示没有模式对话框的基本 UI,另外 /qb!
意味着您无法取消卸载过程。
有关它的更多信息,您可以找到 here .
问候