go to any dotnet application shortcut made by dotnet setup and click property, in the screen that\'s come up, why find target button is disabled?!
this
This is a feature of Windows Installer and is called "Advertised Shortcut". This shortcut contains information about the product it is pointing to.
You can turn this on/off in your setup, by setting the DISABLEADVTSHORTCUTS property.
In the MSI world there are two types of shortcut - advertised and non-advertised.
A non-advertised shortcut is a standard windows shortcut. If you right-click it you will see the target field points to the executable that will be launched. If, for whatever reason, this executable is missing the application will simply fail.
An advertised shortcut is a technology specific to Windows Installer. If you right-click an advertised shortcut the target field will be greyed out. An advertised shortcut supports advertisement and repair.
Repair means that if the executable to which the shortcut is pointing is not there then windows installer will repair the application and replace the missing file. In fact, it will also check other important files, flagged as key paths, and if any of those are missing it will replace them as well.
Advertisement is a process in which the application appears to be installed the shortcuts are there but the application is not actually installed. The installation, the copying of files and registry entries, only takes place when the user first launches the application. An advertised install only puts down what we call the application interfaces. An application interface is any way to start the application. This could be a shortcut, file extension or COM interface.
To add the property, you can use Orca MSI Editor, or take a look at how to Set DISABLEADVTSHORTCUTS property in VS.NET setup project article.
Some more interesting info over here. You can directly run setup.exe with the parameters - setup.exe DISABLEADVTSHORTCUTS=1
or msiexec.exe
.
And, if you are using Orca MSI Editor, you can set the property by opening your msi file, and going to the Property
page (on the left), and adding a new property by right-clicking "Add Row
" menu option. Save the msi, and you are done.