简体   繁体   English

使用nullsoft卸载程序删除程序设置

[英]Removing program settings with nullsoft uninstaller

I have a C# program that is installed using Nullsoft installer script and I have discovered that the program is littering files :) . 我有一个使用Nullsoft安装程序脚本安装的C#程序,并且发现该程序乱扔文件:)。

The program is using: 该程序正在使用:

Properties.Settings.Default.Save

to store settings. 存储设置。 These settings seems to end up in a folder with a very nontrivial name like: 这些设置似乎以一个非常简单的名称结尾,例如:

$user/appdata/local/$publisher/myprogram_Url_sad546a5s4d6a5sd1adsd6/$version/

So my question is: How do I find this name from NullSoft so I can remove the files? 所以我的问题是:如何从NullSoft中找到此名称,以便删除文件?

A quick and dirty solution would of course be to remove every older containing the name "myprogram" but that would prevent having several versions of the program. 一个快速而肮脏的解决方案当然是删除每个包含“ myprogram”名称的旧版本,但这将阻止该程序的多个版本。

You can search for files/folders with the ${Locate} "$localappdata\\$publisher" "/L=D /G=0 /M=myprogram_*" MyCallbackfunc macro and check in MyCallbackfunc if that folder contains a $version folder. 您可以使用${Locate} "$localappdata\\$publisher" "/L=D /G=0 /M=myprogram_*" MyCallbackfunc宏搜索文件/文件夹,并检查MyCallbackfunc是否包含$ version文件夹。 You can also call FindFirst directly if you don't want to use a macro... 如果您不想使用宏,也可以直接调用FindFirst

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM