Question

I have a C# application, and a Visual Studio (2010) Setup Project with it. In my Setup Project, I am using InstallAllUsers = True. Additionally, my application needs to launch at Startup, so a shortcut is being added to the User's Startup Folder.

So I install my application as user Bob (from a share), and then I log off and log on as user Alice. Alice gets a dialogue that says:

The feature you are trying to use is on a network resource that is unavailable.

It provides the network path from which the MSI was installed. So, basically, it's looking for the MSI on a share that Alice doesn't have access to. This is repeatedly reproducible if Alice tries to manually launch the Startup link. However, Alice can directly launch the exe from the installation location, which works fine.

I don't fully understand why it is looking for an MSI, but I guess it makes sense that an application can not be completely installed by one user for another user, so the MSI is needed to complete the installation.

But if that is the case, then I don't understand why the MSI only seems to be required when launching from the Startup link, and not from the exe directly.

My question has several parts:

  1. Is what I am experiencing expected behaviour for the InstallAllUsers option?
  2. If so, how can I ensure that my application is fully installed for all users?
  3. Is it necessary to copy the msi locally, and ensure that it does not get deleted before each user has had a chance to log on?
Était-ce utile?

La solution

This is happening because the shortcuts are "advertised shortcuts" hence the greyed out target box.

More info here...

http://www.advancedinstaller.com/user-guide/advertised-shortcuts.html

When an advertised shortcut is launched it validates the checks associated with the key resources. If any is missing it will fix it by running the installation package and installing again all information from the .msi file.

This is why its trying to run the msi.

You can turn off advertised shortcuts by reading this article...

DISABLEADVTSHORTCUTS=1 disables all shortcuts

If its an all users install, then the shortcut will probably want to reside in the all users start menu. Win 7: C:\ProgramData\Microsoft\Windows\Start Menu.

Autres conseils

Eric, I would recommend taking a look at the shortcut file contents. You can do this by using Powershell, and there is a SO link to help you on your way:

Editing shortcut (.lnk) properties with Powershell

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top