469,927 Members | 1,777 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

Clicking on created shortcut triggers reinstallation

I have a very strange problem.

I have developed a .NET solution. To set up user clients I have also
included a "Deployment Project" in the solution:

Using "File System Editor | User's Program Menu" configuration a "Shortcut"
is created and pointing to the client EXE-file.

The created msi-file, NETProgram.msi, works perfectly on the clients.
A Start Menu shortcut is correctly created in "C:\Documents and Settings\All
Users\Start Menu\Programs\NETProgram", and the client EXE is started when
clicking on the shortcut.

The strange thing is that after "a while" the shortcut doesn´t work anymore.
When clicking on the shortcut instead following happens:
1. First a dialog with text "Preparing to install..." is shown.
2. After a few seconds a new dialog is shiown with the text "The feature you
are trying to use is on a network resource that is unavailable.
Click OK to try again, or enter an alternative path to a folder containing
the installation package 'NETProgram[1].msi' in the box below."

Why this corrupted behaviour ?

I have yet no idea what it is that makes the shortcut to stop working.
Nothing has happened with the EXE-file that the shortcut is pointing out.

Any hint is appreciated.

Best regards,
Benjamin, Sweden
Jul 21 '05 #1
2 2247
After looking around little - I have now understood that it is relevant to
mention that we have implemented an auto-update-client-feature that is
working well.


Anyway - I do not Windows to do any automagically repair checks for this
application. How to configure the "Deployment Project" ?
Jul 21 '05 #2

The behavior you observed is the "resiliency" feature of Windows Installer.
The shortcuts generated by Setup Project are all "advertised shortcuts"
which can trigger resiliency.

INFO: Description of Resiliency in Windows Installer

We have no direct way to disable this feature in the Setup Project. You
have two options here:

1. Do not generate the shortcut in the Setup Project. Instead, wrtie a
custom action and use IShellLink to create a shortcut on your own. The
following article will be useful to you:

Using the IShellLink interface to create file shortcuts.

You need to pass the installation target folder and the programs menu
folder into the custom action:

Walkthrough: Passing Data to a Custom Action
ml/vxwlkWalkthroughPassingDataToCustomAction.asp?fram e=true

2. You can build your current Setup Project with the shortcut and then use
Windows Installer Platform SDK tool to modify the resultant MSI directly:

How To Use the Orca Database Editor to Edit Windows Installer Files

You need to modify the "Shortcut" table. Replace the "Target" column with
the formatted identifier for the EXE file (e.g. " [#filekey]" where
"filekey" is the "File" column of the EXE file in the "File" table). You
may need some basic Windows Installer knowledge here:

Shortcut Table

I hope this helps.


Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Reg (Lincolnshire) | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.