NSIS 识别多个卸载程序
我有一个程序的多个实例,每个实例都有自己的安装目录以及自己的卸载程序副本。安装程序有一个由用户输入的名为“$instance”的字段,该字段记录在注册表中,如下所示:
“SOFTWARE\@vendor.name@\@product.name@ @product.version@\installs\$instance”
HKLM 工作正常。该键包含安装的根路径。
我想卸载与执行的卸载程序相对应的程序实例,但卸载部分不保留用户在安装时输入的变量“$instance”。
有什么想法吗?
例子:
Section Uninstall
; THIS does not display the instance name. :(
MessageBox MB_OK "$instance"
SectionEnd
I have multiple instances of a program and each has its own install directory with its own copy of the uninstaller. The installer has a field called "$instance" entered by the user which is recorded in the registry like this:
HKLM "SOFTWARE\@vendor.name@\@product.name@ @product.version@\installs\$instance"
which works fine. This key contains the root path of the install.
I would like to uninstall the instance of the program that corresponds to the uninstaller that is executed but the Uninstall section does not retain the variable "$instance" that the user entered at install time.
Any ideas?
Example:
Section Uninstall
; THIS does not display the instance name. :(
MessageBox MB_OK "$instance"
SectionEnd
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将自定义数据存储在uninstaller.exe的末尾而不破坏CRC检查,或者将其存储在与卸载程序相同的目录中的 .ini 中(我一直这样做,只需将 ini 文件命名为“uninstaller.dat”或类似的名称,这样用户就不会弄乱它)
You can store custom data at the end of the uninstaller.exe without breaking the CRC check, or alternatively store it in a .ini in the same directory as the uninstaller (I do this all the time, just name the ini file "uninstaller.dat" or something like that so users don't mess with it)