为什么我的卸载程序在 nsis 中无法正常工作? [英] Why my uninstaller is not working properly in nsis?
问题描述
我编写了一个 nsis 脚本,我需要在其中提示用户以前安装的位置,如果用户选择与以前版本相同的文件夹,则卸载以前的版本.它工作正常.但假设用户选择的目录与之前的目录不同uninstall.exe 出现问题.
I have written a nsis script in which i need to prompt the user where there was previous installation and uninstall the previous version if user select the same folder as previous version.It is working fine.But suppose user choose different directory than the uninstall.exe is giving problem.
Ex-suppose user install version 1.2 in folder a and then agian version 1.2 in folder B .
Than in every case the uninstall .exe is pointing to folderb not folder a.How can i solve this issue
推荐答案
在卸载程序中,$instdir
只是卸载程序所在的目录,因此卸载程序本身不需要关心.
In the uninstaller, $instdir
is just the directory the uninstaller is in so the uninstaller itself should not care.
你说你在提示用户,所以你已经知道旧安装的位置,所以你所要做的就是调用带有特殊参数的卸载程序 所以它知道从哪里卸载...
You say you are prompting the user, so you already know the location of the old install so all you have to do is to invoke the uninstaller with the special parameter so it knows where to uninstall from...
这篇关于为什么我的卸载程序在 nsis 中无法正常工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!