卸载应用程序时删除文件

编程入门 行业动态 更新时间:2024-10-10 08:24:40
本文介绍了卸载应用程序时删除文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想在卸载时删除一个与应用程序设置无关的文件. 我怎么能删除那个文件.该文件可能在系统中的任何位置 如果有人知道解决方案,请回复我 谢谢您.

HI friends i want delete the one file which not related to the application setup at the time of uninstall. how could i delete that file . that file may be at anywhere in system if any one know the solution please reply me thanking you

推荐答案

在安装时记下文件的位置,并将其保存在某些文件(config,.ini等)或注册表中.然后,您可以在卸载时快速找到并删除它. Make a note of the file''s location at installation time and save it in some file (config, .ini etc) or in the Registry. Then you can quickly locate and delete it at uninstall time.

嘿,您只需要创建一个exe文件,然后将其与您的安装程序一起安装在卸载部分即可.在该exe代码中,您有2检查是否所有包含该文件的系统驱动器,都可以使用system.Eviourmnet.getLogicalDrives()方法. hey u have to just create one another exe an attach it with ur setup and in uninstallation section. In that exe code u have 2 check all systemdrives containing that files or not for it u can use system.Eviourmnet.getLogicalDrives() method.

更多推荐

卸载应用程序时删除文件

本文发布于:2023-11-27 12:40:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1638117.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   文件

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!