DISABLEADVTSHORTCUTS=1 disables all shortcuts
Asked Answered
V

4

14

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.

Vladamar answered 29/1, 2010 at 22:51 Comment(2)
Please check this comprehensive article on how to solve cyclical self-repair problems. Though DISABLEADVTSHORTCUTS works to a degree, the underlying problem can not be solved unless you understand the causes.Vosges
It took me FOREVER to find this post to add 'Run As Administrator' to an app installed using Visual Studio (2017 Community)'s installer. You should maybe consider making the title/question a bit more 'friendly'. But thanks for posting; @Doctor Bonzo and Will Hollebrandse (sorry, SO stops me notifying you) deserve medals.Imbalance
F
25

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.

Frisian answered 15/4, 2010 at 17:35 Comment(5)
Good little hack. Also, instead of having this extra dialog in there, you can have this new dialog replace the Welcome one, by deleting the Welcom dialog and putting appropriate text in the new textbox dialog's BannerTitle and BannerText properties.Dabchick
This works great. Beats the crap out of having to mess with ORCAOpiate
Why oh why must this be so complicated when it could just have been a setting in the installer project properties.Underlay
Original link may be Jacob Wagner's post on MSDN.Hezekiah
What a great way to add ad-hoc properties to a setup project.Sevenfold
J
13

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

Jittery answered 19/7, 2010 at 17:1 Comment(3)
The nicest solution I've found so far is to use Method 1 described in the above WDC link above, but instead of editing each individual .msi after it is built, use Method 1 to set the property in "<VS install folder>\Common7\Tools\Deployment\VsdSchema\schema.msi". Once the property is set in "schema.msi" all subsequently built .msi files will have the property set.Modlin
@Damian Vogel you are the man! This worked flawlessly. Since above link for the file was not working the WiRunSQL.vbs file can be found here github.com/Excel-DNA/WiXInstaller/blob/master/Source/… Just copy paste the code in notepad and save with name WiRunSQL.vbs and it will work!Charla
Thank you, and to @AaronThomas for a superb piece of 'cake icing' that - finally! - gave me RaA on my installed app. I only hope I remember to make this change if I ever reinstall VS!Imbalance
R
2

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]

Ramah answered 1/2, 2010 at 5:59 Comment(0)
P
1

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.

Plaintiff answered 17/11, 2014 at 20:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.