如何以编程方式删除广告的快捷方式?

发布于 2024-07-16 18:02:45 字数 455 浏览 4 评论 0原文

因此,我搞砸了一个 msi 安装程序,并仅在测试安装后部署了它,而不是卸载(我知道不好,在安装后添加了 exe 的运行,但忘记指定它只应在安装时发生,而不是在卸载时发生)。

我找到了 Windows Installer Cleanup util,以及我将用来自动化安装的相关 msizap过程。 现在的问题是,当之后安装较新的版本时,广告中的快捷方式仍然尝试进行修复(或者尝试加载旧版本时实际执行的任何操作)并失败。 直接从文件运行程序工作正常,但我需要以自动方式删除广告的快捷方式。 它现在不需要非常强大、相当小的私人测试版安装基础,因此可以假设快捷方式位于桌面和开始菜单的原始安装位置。

对于广告中的快捷方式,我是否需要考虑任何特殊问题,或者我可以将其视为任何其他文件并将其删除吗?

So I botched an msi installer and deployed it after only testing installation, not uninstall (bad I know, added running of an exe after install, but forgot to specify that it should only occur on install not uninstall).

I found the Windows Installer Cleanup util, and the related msizap that I'll use to automate the process. The problem now is that when a newer version is installed on top afterwards, the advertised shortcut still tries to do a repair (or whatever it's actually doing trying to load the old version) and fails. Running the program directly from the file works fine, but I need to remove the advertised shortcuts in an automated way. It doesn't need to be incredibly robust, fairly small private beta install-base right now, so can assume that shortcuts are in the originally installed locations of desktop and start menu.

Are there any special concerns I need to take into account for an advertised shortcut or can I just treat it as any other file and just remove it?

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

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

发布评论

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

评论(2

携余温的黄昏 2024-07-23 18:02:45

就快捷方式而言,它只是一个可以删除的普通文件。

不过,我会警告您使用 MSIZAP - 它实际上是最后的手段,并且会留下大量信息,共享 DLL 计数、注册表项、文件等。一旦删除 Windows Installer 信息,您就可以需要从注册表中删除与您的程序相关的任何信息。 SharedDLL 引用计数是最糟糕的事情,因为当您尝试使用新的 MSI 重新安装/卸载时,它们会搞砸。

Rob 有一篇很好的文章,详细介绍了一些 使用 MSIZAP 的陷阱。 除非您准备好手动查找它留下的所有注册表信息,否则您不想使用它。

As far as the shortcut is concerned, it's just a normal file that can be deleted.

However I'll caution you about using MSIZAP - it is really a last resort and leaves a lot of information behind, shared DLL counts, registry entries, files, etc. Once removing the Windows Installer information you then need to remove any information related to your program from the registry. SharedDLL ref counts are the worst thing as they'll screw up when you try to reinstall/uninstall with the new MSI.

Rob has a good post up detailing some of the pitfalls of using MSIZAP. It's not something you want to use unless you're prepared to manually hunt down all the registry information it leaves behind.

冷夜 2024-07-23 18:02:45

据我所知,广告中的快捷方式负责进行设置。
这些是特殊的 lnk 文件,它们指向安装程序,并带有 spicel 参数,该参数将在激活时执行安装(您可以使用记事本或十六进制编辑器查看信息)。
尽管如此,MSI zap 应该已经删除了所有安装痕迹。
如果您执行 zap 然后按快捷键,安装程序是否会运行? 或者你得到一个错误?

AFAIK adverited shortcuts are responsible for doing the setup.
Those are special lnk files that have point to the installer with a spicel param that will preform the setup when they are activated (you can see the info with notepad or hex editor).
never the less, MSI zap should have remove all trace of the setup.
Does the setup runs if you do a zap then press the shortcut? or you get an error?

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