DISABLEADVTSHORTCUTS=1 disables all shortcuts

旧巷老猫 提交于 2019-12-17 22:53:27

问题


We have an application to be run on startup that allows many installed files to be changed after installation. We are trying to turn off the self-healing mode by setting the DISABLEADVTSHORTCUTS=1 property in Orca. However, no shortcuts are being created when this property is set. All the information I've seen indicates that we should be able to create "non-advertised" shortcuts with DISABLEADVTSHORTCUTS=1 set. Any ideas?

I have verified that the shortcuts are created correctly if DISABLEADVTSHORTCUTS is left unchanged.


回答1:


If you're creating a Setup and Deployment project in Visual Studio 2008, there's a very slick trick to make your shortcuts NON-advertised:

Add a textboxes panel in the UI editor. Make all the textboxes invisible. Make one of the properties 'DISABLEADVTSHORTCUTS' instead of EDITAx. Make the value '1'. Your shortcuts will be non-advertised.

I'd like to give credit for this to whomever I stole it from, but I can't seem to find the original link.




回答2:


Not sure if that helps, but You might give it a try: do it programmatically instead of manually.

Source post: Windows Developer Center (via discussweb.com)

"Copy the WiRunSQL.vbs file into your project directory. Now, in Visual Studio 2005, select your setup project in the solution explorer. Select its properties. In the property window, add the following script to PostBuildEvent property.

cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "INSERT INTO Property(Property, Value) VALUES ('DISABLEADVTSHORTCUTS', '1')"

This script will automatically run once the project has been built and will insert the DISABLEADVTSHORTCUTS true value into the application MSI property table."

If You don't know where to find the WiRunSQL.vbs file, I got it from the following site: svn.nuxeo.org




回答3:


You can't disable self-healing, so why not just install non-Advertised shortcuts to begin with?

You don't specify what you're using to create this package, but with WiX for example you would just set Shortcut/@Advertise='no'

If you are trying to massage an existing installation package with Orca, see the documentation for the Shortcut table. An advertised shortcut will have something like ProductFeature in the Target column, while a non-advertised shortcut will use something like [APPLICATIONFOLDER]MyApp.exe or [#MyApp.exe]




回答4:


Self-healing can be hard to debug and understand, but you need to understand its causes to be able to manage it effectively.

Please check: How can I determine what causes repeated Windows Installer self-repair? for a comprehensive review of this core MSI issue. It can not be managed reliably simply by changing your shortcuts.

Here is another article with core MSI information: The corporate benefits of using MSI.



来源:https://stackoverflow.com/questions/2165781/disableadvtshortcuts-1-disables-all-shortcuts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!