What is happening here is that visual studio is creating an advertised
shortcut. An advertised shortcut when launched verifies that all of the
installed files are correct. If one of these files was removed or changed
the MSI will launch a repair to replace the changed or removed file. You
can stop this behavior by changing the shortcuts to unadvertised shortcuts.
To create a regular shortcut in your deployment project you will need to
use the ORCA tool.
It comes with the Windows installer SDK available here
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
The documentation is also available there.
What you have to do is open the MSI with Orca and go to the shortcut table.
In the shortcut table you will find an entry for every shortcut your
project creates, find your shortcut in the table.
You now want to change the Target from "DEFAULTFEATURE" to probably
"[TARGETFOLDER]\<name of your app>"
You then want to remove any text under the Icon_ row.
The Target row contains information about how the shortcut accesses the
program when you add the [ ] around it it tells it that it is not an
advertised shortcut.
[TARGETFOLDER] is a macro that expands into the installed folder for the
app.
The Icon_ column is necessary for advertised shortcuts and needs to be
removed.
I hope that helps.
Todd Derksen
--------------------
Visual Basic Deployment Test Team
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
[quoted text, click to view] >Thread-Topic: Desktop shortcut runs installer
>
>I have used a Visual Studio Deployment project to create a desktop
shortcut
>to my
>application during the installation process. I went through the normal
>steps of creating a shortcut to the "Primary Output" of my VB project and
>dragging that to the Desktop folder in the file system. The first time
that
>I click on the shortcut after the installation, it works as expected and my
>application starts up. Every time after that when I click on the
>shortcut, the Windows installer starts and does some "progress bar"
>runs and then eventually my application starts. The real problem comes
>if the original installer file (the .msi for my app.) is not still on
>the user's PC (they have removed the CD from the drive) the Windows
>installer portion stops and asks for the installation file. If it is
>not provided, the operation stops and my application does not run.
>
>The other strange thing is that when I look at the properties of the
>Shortcut before and after the first run, the size changes from 1.98 KB
>to 2.43 KB. If I create a normal shortcut pointing to my installed
>app, it works fine forever (too bad I can't do that with the
>development project).
>
>Has anyone seem this behavior and how do I get it to stop.
>
>Thanks
>