views:

560

answers:

2

Hello,

I am developping a MSI installer by using WIX, I can create shortcut on desktop for only one user. Now what shall I do to make a shortcut for all users on the machine? Please advise. Thank you.

<Shortcut Id="desktopshortcut" Directory="DesktopFolder" Name="test" WorkingDirectory='INSTALLDIR' Advertise="yes" />
A: 

Set ALLUSERS=1, so that the Installer points the DesktopFolder property to the common desktop instead of the installing user's desktop.

Franci Penov
Thanks for answering, but seems it doesn't work. It says ALLUSERS attribute is not declared after I add it into my code. Is there anything else I need to add? Thanks a lot!
Ray
+2  A: 

You can have WiX set ALLUSERS=1 automatically by declaring Package/@InstallScope='perMachine'... e.g.

<Package Description="!(loc.Package_Description) $(var.version)"
   Comments="!(loc.Package_Comments)"
   Manufacturer="!(loc.ManufacturerName)"
   InstallerVersion="301"
   Compressed="yes"
   InstallPrivileges="elevated"
   InstallScope="perMachine"
   Platform="$(var.ProcessorArchitecture)" />
sascha
Thanks a lot! This works!
Ray