您建议在卸载时只删除已安装文件的库或宏?在卸载时删除已安装文件的推荐库/宏
我知道这种问题已被问很多,但我正在寻找关于最新和最容易使用宏/库的建议。和以前一样,我使用了在NSIS Website上发布的旧宏,用于命令行参数解析等问题,并且存在代码和实现方面的问题。
我的理解是,有2到目前为止,(有没有更多?):
Advanced_Uninstall_Log
Uninstall_only_installed_files
哪个库或单宏你使用和推荐吗?
我希望能够通过只指定文件夹X(及其所有子文件将被安装)来安装文件,然后卸载程序将删除文件夹X中的所有子文件,但保留任何创建的用户。
对于如:
Section "install"
File \r "FolderX"
# note how I dont do this..
File \r "FolderX\filea.txt"
File \r "FolderX\fileb.txt"
SectionEnd
Section "un.uninstall"
${RemoveDir} "FolderX"
# The above hypothetical function will hopefully only delete the files in FolderX that I installed.
Delete \r "FolderX\filea.txt"
Delete \r "FolderX\fileb.txt"
SectionEnd