Replies: 1 comment
-
|
That's Windows Installer behavior, which means it is outside of the control of the WiX Toolset. You'd need to follow up with Microsoft. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Question
I'm trying to create a dual-purpose package that can be installed either in the per-user or the per-machine context. To achieve that i set the
Scopeof thePackageto "perUserOrMachine". This setsALLUSERS=2andMSINSTALLPERUSER=1, which is in line with the Single Package Authoring recommendations by Microsoft https://learn.microsoft.com/en-us/windows/win32/msi/single-package-authoring. To the GUI i added a checkbox that can be unchecked to unsetMSINSTALLPERUSER.This works perfectly fine to control my
INSTALLDIRwhich is defined in the following way:When the checkbox is checked (
MSINSTALLPERUSER=1) theINSTALLDIRresolves to a subdirectory ofC:\Program Files\and installs my app there. When it's unchecked (MSINSTALLPERUSER=)INSTALLDIRresolves to a subdirectory ofC:\Users\<UserName>\AppData\Localand my files are installed there.But for some reason the same logic does not apply when i try to create shortcuts in the program menu:
No matter if the checkbox is checked or not my shortcuts are always created in a subdirectory of
C:\Users\<UserName>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs. According to my understanding, whenMSINSTALLPERUSERis unset, the shortcuts should be created in a subdirectory ofC:\ProgramData\Microsoft\Windows\Start Menu\, as they would ifALLUSERSwas set to 1At first i thought something went wrong in resolving the
StandardDirectory, but even when i don't use it and manually setSHORTCUTS="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\...my shortcuts seem to be redirected and are still created inC:\Users\<UserName>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\...(silently, without throwing any errors)Is this behavior intentional? Why should a multi-purpose package not be allowed to create system-wide shortcuts?
Open Source Maintenance Fee
wixtoolsetproject because I support the maintainers.Beta Was this translation helpful? Give feedback.
All reactions