开发者

DISABLEADVTSHORTCUTS=1 disables all shortcuts

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 inf开发者_StackOverflow中文版ormation 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.


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.


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


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]


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜