Clicking on created shortcut triggers reinstallation

G

Guest

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
 
G

Guest

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.

http://windowsforms.net/articles/appupdater.aspx

Anyway - I do not Windows to do any automagically repair checks for this
application. How to configure the "Deployment Project" ?
 
F

Felix Wang

Hi,

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
http://support.microsoft.com/?id=290997

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.
http://www.mvps.org/emorcillo/dotnet/shell/shortcut.shtml

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

Walkthrough: Passing Data to a Custom Action
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/ht
ml/vxwlkWalkthroughPassingDataToCustomAction.asp?frame=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
http://support.microsoft.com/?id=255905

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
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/s
hortcut_table.asp

I hope this helps.

Regards,

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.
 
G

Guest

Hi Russ-S!

This is not much of comfort. But when we upgraded to VS2005 we terminated
the AppUpdater functionalty and instead turned over to built in ClickOnce,
that works flawless.

Best regards
Benjamin,
Sweden
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top