How does the InstallAllUsers option work?

I have a C # application and a Visual Studio (2010) installation project with it. In my installation project, I use InstallAllUsers = True . In addition, my application should start at startup, so a shortcut is added to the User Startup Folder .

So, I install my application as a Bob user (from a shared resource), and then I log out and log in as an Alice user. Alice gets a dialogue that says:

The function you are trying to use is located on a network share that is not available.

It provides the network path from which MSI was installed. So, basically, he is looking for an MSI for a share that Alice does not have access to. This is replayable if Alice tries to manually launch the Launch link. However, Alice can directly run exe from the installation location, which works fine.

I don’t quite understand why he is looking for MSI, but I think it makes sense that the application cannot be completely installed by one user for another user, so MSI is needed to complete the installation.

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

My question consists of several parts:

  • Is this the expected behavior for the InstallAllUsers parameter?
  • If so, how can I make sure my application is fully installed for all users?
  • Is it necessary to copy msi locally and make sure that it is not deleted before each user can log in?
+4
source share
2 answers

This is because the shortcuts are "declared shortcuts", hence the gray target field.

More details ...

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

When the declared shortcut starts, it checks the checks associated with key resources. If any of them is missing, it will fix it launching the installation package and reinstalling all the information from the .msi file.

That is why he is trying to start msi.

You can disable the advertised labels by reading this article ...

DISABLEADVTSHORTCUTS = 1 disables all shortcuts

If all users are installed, the shortcut will probably want to be in the menu of all users. Win 7: C: \ ProgramData \ Microsoft \ Windows \ Start Menu.

+2
source

Eric, I would recommend taking a look at the contents of the shortcuts file. You can do this using Powershell, and there is an SO link that will help you on your way:

Editing Shortcut Properties (.lnk) with Powershell

+1
source

Source: https://habr.com/ru/post/1404003/


All Articles