How to create a folder shortcut for autorun for each user in each machine?

I am installing an application using WiX 3 for all users (ALLUSERS = 1 property). I would like to create a shortcut for my application in the current startup folder of the user. How can I override ALLUSERS = 1 only for my Startup folder?

I am using the WiX shortcut element:

<Shortcut Id="MyAppShortcut" Directory="StartupFolder" ... /> 

but "StartupFolder" goes to the "All Users" folder due to installation on the computer.

Any suggestions?

+4
source share
1 answer

Installing a shortcut only for the current user does not seem like a good idea: what if I install your software under an account that I use only for administrative tasks, such as installing software? Because I try to follow best practices and "Do not run as administrator" !

If you are trying to run one instance of software in the background for the entire system, you should probably write your software as a Windows Service instead of creating startup shortcuts. Wix supports installation of the service .

If you want the user interface component to configure / manage the service to work in the tray, you can then set a shortcut for a separate executable file in the "All Users" folder. Thus, all users can interact with the service, but the service itself is launched only once.

+4
source

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


All Articles