我使用NSIS创建了一个安装程序,使用以下NSIS脚本在我的系统中安装googletalk软件,
Name "installer"
OutFile "new_setup.exe"
InstallDir "$PROGRAMFILES\Google talk"
Section
SetOutPath $INSTDIR
execWait '$DESKTOP\googletalk-setup.exe'
SectionEnd
现在,如果我再次执行安装程序,则在安装之前应检查该软件是否已存在。
那么在 NSIS 中如何实现呢?。
请告诉我代码。
提前致谢!
答案 0 :(得分:0)
在安装过程中,您需要在注册表中创建卸载信息。 (在Windows控制面板上的“添加/删除程序”中可见)
我建议你遵循这个例子:
http://nsis.sourceforge.net/Add_uninstall_information_to_Add/Remove_Programs
然后在你的“.onInit”函数中,你只需要用ReadRegStr来检查这些值:
http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.2.12
希望这可以帮到你。