如何判断安装程序有卸载程序?

发布于 2024-11-28 19:50:38 字数 213 浏览 5 评论 0原文

我制作了一个小型应用程序,无需设置。只需从 A 复制到 B。现在我还想复制 Windows 系统中的快捷方式 (lnk) 文件,以使应用程序显示为可卸载。 但是,当谷歌搜索“链接快捷方式卸载窗口”等关键字时,会出现大量不需要的东西。

您能给我提供任何链接如何告诉 Windows 图标和应用程序作为可卸载程序吗?

问候

PS:我的问题不是如何创建 lnk 文件。

I have made a small application without setup. Just copy from A to B. Now I wanted to copy also a shortcut (lnk) file in the Windows system to have the application visible as uninstall-able.
But when googling for keywords like "link shortcut uninstall windows" there are tonns of unneeded stuff.

Can you provide me any link how to tell Windows the Icon and Application as uninstallable program?

Regards

PS: my question is NOT how to create an lnk file.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

苍白女子 2024-12-05 19:50:38

我不确定我是否理解您的问题,但您可以将程序添加到注册表中,使其出现在“软件”(Windows) 中:

示例:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NameOfYourProgram]
"DisplayName"="NameOfYourProgram"
"UninstallString"="path/to/program/NameOfYourUninstaller.exe"

替换 NameOfYourProgrampath/to /program/NameOfYourUninstaller.exe 以满足您的需要,然后将其另存为 .reg 文件并双击将其添加到注册表中。

DisplayNameUninstallString 是必需的。

还有一些参数是可选的: http://nsis.sourceforge.net/Add_uninstall_information_to_Add/Remove_Programs #Optional_values

I'm not sure if i understood your question, but you can add your program to the registry to make it appear in "Software" (Windows):

Example:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NameOfYourProgram]
"DisplayName"="NameOfYourProgram"
"UninstallString"="path/to/program/NameOfYourUninstaller.exe"

Replace NameOfYourProgram and path/to/program/NameOfYourUninstaller.exe to fit your needs, then save this as a .reg-file and double click it to add it to the registry.

DisplayName and UninstallString are required.

There are some more parameters, which are optional: http://nsis.sourceforge.net/Add_uninstall_information_to_Add/Remove_Programs#Optional_values

谈下烟灰 2024-12-05 19:50:38

您无法将 .lnk 文件转换为带有卸载说明的安装程序。

如果您希望应用程序出现在 Windows 的已安装程序列表中并可供卸载,则需要编写一个简单的安装程序。有许多非常简单的工具可以让您构建安装包 - 您应该使用其中之一。

You can't turn a .lnk file into an install program with uninstall instructions.

You need to write a simple installer if you want the application to appear in Window's list of installed programs, and be available for uninstall. There are many very simple tools that will let you build an install package—you should use one of these.

国际总奸 2024-12-05 19:50:38

在这种情况下,您将需要提供卸载程序或脚本。无法告诉安装程序数据库“只需删除这些文件”。在这种情况下,您必须让用户复制应用程序和卸载程序。如果不这样做,他们最终会得到一个无法使用的卸载程序条目。因此,如果您需要卸载程序,最好也使用安装程序。此外,很少有应用程序可以通过卸载程序将其复制到任何地方。

(我想也许您可以使用在特殊模式下运行的应用程序作为卸载程序,但我建议不要这样做。)

In this case, you will need to provide an uninstaller program or script. There's no way to tell the installer database "just delete those files". In that case, you will have to have the user copy both the application and the uninstaller. If they don't, they'll end up with an uninstaller entry that they can't use. For this reason, if you want an uninstaller, it's best to also use an installer. Additionally, it's very rare for applications that you just copy wherever you want to come with uninstallers.

(I suppose that maybe you could use your application run in a special mode as an uninstaller, but I would recommend against this.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文