卸载程序时,如何从C盘中的appdata文件夹中删除我的应用程序文件? [英] How can I remove my application files from appdata folder in C drive , when uninstall program?

查看:282
本文介绍了卸载程序时,如何从C盘中的appdata文件夹中删除我的应用程序文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我卸载应用程序时,如何删除c盘appdata文件夹中写入的文件。



我尝试过:



i使用visual studio 2013使用安装项目创建winforms安装程序。但是当我安装安装程序时,应用程序将安装到c盘中的程序文​​件,但我需要写一些文件,但是这个文件夹没有提供写入权限,因为这个问题。我尝试将文件写入c盘中的appdata文件夹。



但是当我卸载应用程序时,卸载后,appdata文件夹中写入的文件不会被删除。

How can i remove files write on the c drive appdata folder, when i uninstall application.

What I have tried:

i create winforms installer using setup project using visual studio 2013. But when i install the installer the application will install to program files in c drive,but i need to write some file, but this folder does not provide permission to write, because of this problem .i try to write files to appdata folder in c drive.

But when i uninstall application ,the files write in the appdata folder does not remove after uninstalation.

推荐答案

最佳做法是留下任何数据。您的安装人员不对此负责。用户可能需要在另一个程序中使用数据,甚至在应用程序的升级版本中使用。



但是,如果你真的需要删除它,那么你' d必须构建自定义操作才能删除它。在自定义操作之外的MSI安装程序无法触及通过正常方式未放置的任何文件。
Best practice is to leave any data behind. Your installer is not responsible for it. The user may need to use the data in another program or even in an upgraded version of the application.

But, if you really need to remove it, then you'd have to build a custom action to go delete it. An MSI installer, outside of a custom action, cannot touch any files it didn't lay down through normal means.


这篇关于卸载程序时,如何从C盘中的appdata文件夹中删除我的应用程序文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆