如何判断安装程序有卸载程序?
我制作了一个小型应用程序,无需设置。只需从 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不确定我是否理解您的问题,但您可以将程序添加到注册表中,使其出现在“软件”(Windows) 中:
示例:
替换
NameOfYourProgram
和path/to /program/NameOfYourUninstaller.exe
以满足您的需要,然后将其另存为 .reg 文件并双击将其添加到注册表中。DisplayName
和UninstallString
是必需的。还有一些参数是可选的: 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:
Replace
NameOfYourProgram
andpath/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
andUninstallString
are required.There are some more parameters, which are optional: http://nsis.sourceforge.net/Add_uninstall_information_to_Add/Remove_Programs#Optional_values
您无法将 .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.
在这种情况下,您将需要提供卸载程序或脚本。无法告诉安装程序数据库“只需删除这些文件”。在这种情况下,您必须让用户复制应用程序和卸载程序。如果不这样做,他们最终会得到一个无法使用的卸载程序条目。因此,如果您需要卸载程序,最好也使用安装程序。此外,很少有应用程序可以通过卸载程序将其复制到任何地方。
(我想也许您可以使用在特殊模式下运行的应用程序作为卸载程序,但我建议不要这样做。)
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.)