如何以编程方式删除广告快捷方式? [英] How do you remove an advertised shortcut programmatically?

查看:31
本文介绍了如何以编程方式删除广告快捷方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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).

我找到了 Windows Installer Cleanup 实用程序,以及我将使用的相关 msizap使过程自动化.现在的问题是,当之后在顶部安装新版本时,所宣传的快捷方式仍会尝试进行修复(或尝试加载旧版本的实际操作)并失败.直接从文件运行程序工作正常,但我需要以自动方式删除广告的快捷方式.它现在不需要非常强大、相当小的私有测试版安装库,因此可以假设快捷方式位于桌面和开始菜单的最初安装位置.

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?

推荐答案

AFAIK 宣称的快捷方式负责进行设置.
这些是特殊的 lnk 文件,它们指向带有 spcel 参数的安装程序,当它们被激活时将执行安装(您可以使用记事本或十六进制编辑器查看信息).
无论如何,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?

这篇关于如何以编程方式删除广告快捷方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆