gpt4 book ai didi

.net - 为什么设置后在 dot net 快捷方式中禁用了目标?

转载 作者:行者123 更新时间:2023-12-04 01:33:06 24 4
gpt4 key购买 nike

转到任何 dotnet 应用程序快捷方式 由 dotnet 设置制作 然后点击属性,在出现的画面中,为什么找不到目标按钮?!

这只是发生在 dotnet Setup 生成的快捷方式上,为什么?以及如何启用它?

最佳答案

This is a feature of Windows Installerand is called "Advertised Shortcut".This shortcut contains informationabout the product it is pointing to.

You can turn thison/off in your setup, by setting theDISABLEADVTSHORTCUTS property.


广告捷径

In the MSI world there are two typesof shortcut - advertised andnon-advertised.

A non-advertised shortcut is astandard windows shortcut. If youright-click it you will see the targetfield points to the executable thatwill be launched. If, for whateverreason, this executable is missing theapplication will simply fail.

An advertised shortcut is atechnology specific to WindowsInstaller. If you right-click anadvertised shortcut the target fieldwill be greyed out. An advertisedshortcut supports advertisement andrepair.

Repair means that if the executable towhich the shortcut is pointing is notthere then windows installer willrepair the application and replace themissing file. In fact, it will alsocheck other important files, flaggedas key paths, and if any of those aremissing it will replace them as well.

Advertisement is a process in whichthe application appears to beinstalled the shortcuts are there butthe application is not actuallyinstalled. The installation, thecopying of files and registry entries,only takes place when the user firstlaunches the application. Anadvertised install only puts down whatwe call the application interfaces. Anapplication interface is any way tostart the application. This could be ashortcut, file extension or COMinterface.


编辑
要添加属性,您可以使用 Orca MSI Editor ,或者看看如何 Set DISABLEADVTSHORTCUTS property in VS.NET setup project文章。
编辑 2
一些更有趣的信息在 here .您可以使用参数 - setup.exe DISABLEADVTSHORTCUTS=1 直接运行 setup.exe或 msiexec.exe <path to msi-file> DISABLEADVTSHORTCUTS=1 .
而且,如果您使用的是 Orca MSI Editor ,您可以通过打开您的 msi 文件并转到 Property 来设置该属性。页面(左侧),并通过右键单击“ Add Row”菜单选项添加新属性。保存 msi,你就完成了。

关于.net - 为什么设置后在 dot net 快捷方式中禁用了目标?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1270779/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com