在卸载过程中删除注册表项

编程入门 行业动态 更新时间:2024-10-27 18:19:16
本文介绍了在卸载过程中删除注册表项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个简单的C#应用​​程序,它允许用户指定它应该(或不应该)从Windows启动.可以通过设置(或删除)注册表项(即... \ Software \ Microsoft \ CurrentVersion \ Run \ MyApplicationHere)来实现.

I have a simple C# application that allows users to specify that it should be (or should not be) started with Windows; it does so by setting (or deleting) a registry key (namely, ...\Software\Microsoft\CurrentVersion\Run\MyApplicationHere).

我正在使用VS安装项目来为此程序创建安装程序.我不希望安装程序创建此密钥.仅当用户从程序中选择选项时才创建它.

I am using a VS setup project to create the installer for this program. I don't want the installer to create this key; it should only be created when the user selects the option from within the program.

这是问题所在:我希望卸载程序删除该密钥(如果存在),最好不要诉诸任何黑客手段;如果有一个简单的内置"解决方案,我很想听听.谢谢!

Here is the issue: I would like the uninstaller to delete this key if it exists, preferably without resorting to any sort of hackery; if there is a simple "built-in" solution I would love to hear it. Thanks!

推荐答案

注册表表是为此目的而设计的: msdn.microsoft/en-us/library/aa371168(VS.85).aspx

The Registry table is designed for this: msdn.microsoft/en-us/library/aa371168(VS.85).aspx

尤其是在名称"的描述下: 如果值"列为Null,则下表中名称"列中显示的字符串具有特殊的意义.

See especially under the description of "Name": If the Value column is Null, then the strings shown in the following table in the Name column have special significance.

-卸载组件时,将删除所有具有其值和子项的键(如果存在).

更多推荐

在卸载过程中删除注册表项

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

发布评论

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

>www.elefans.com

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