'Is there a list of known Wix Directory Id values?

I need to create a Wix installer, where I need to create some items on the desktop. The one for all users (C:\Users\Public\Desktop on Windows 10) is restricted, so I'd like to create it on the current user's desktop (C:\Users\\Desktop).

However, all the examples of Wix installers interacting with the desktop use the DesktopFolder value (which is the all users one):

<Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="DesktopFolder" Name="Desktop">
        ... [my stuff for the desktop goes here]
    </Directory>
</Directory>

… where DesktopFolder seems like a well-known identifier for a system special folder.

Wix documentation says nothing.

Is there a list where I could find the id for the desktop folder of the currently logged on user?



Solution 1:[1]

It depends on the InstallScope of your installer (PerUser or PerMachine ).

If you are using PerMachine, you will get public desktop folder.

And, if you are using PerUser, you will get desktop folder of that user.

You can find details about DesktopFolder here and here

They are not wix guideline. But, wix is based on Windows Installer.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 MAQ678