开发者

How to create desktop shortcut for all users in WIX

开发者 https://www.devze.com 2022-12-19 03:05 出处:网络
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. Th

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" />


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)" />


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号