我如何要求用户使用NSIS卸载以前的版本 [英] How do I require user to uninstall previous version with NSIS

查看:274
本文介绍了我如何要求用户使用NSIS卸载以前的版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用 NSIS .
它工作得很好,但是我发现文档有些杂乱无章. 在使用 NSIS 安装新版本之前,我如何要求用户卸载以前的版本?

I have just started using NSIS.
It works very well but I find the documentation a bit unstructured. How do I require user to uninstall previous version before installing a new version with NSIS?

NSIS (Nullsoft可编写脚本的安装系统)是用于创建Windows安装程序的开源系统.

NSIS (Nullsoft Scriptable Install System) is an open source system to create Windows installers.

推荐答案

NSIS是一个出色的Windows Installer.这是我在安装同一应用程序的新版本时使用NSIS卸载当前版本的方法.将以下功能添加到您的NSIS脚本中.

NSIS is a great Windows Installer. Here is how I use NSIS to uninstall the current version while installing a new version of the same application. Add the following function to your NSIS script.

Function .onInit

         Exec $INSTDIR\uninst.exe 

FunctionEnd

此外,您还可以在NSIS Wiki上的自动卸载旧版本之前,请检阅链接.安装新".

Also you can check out this link on the NSIS wiki on "Auto-uninstall old before installing new".

这篇关于我如何要求用户使用NSIS卸载以前的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆