blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

Stuart Preston's Blog

Mostly about Visual Studio Team System, Team Foundation Server, Engineering Practices and Application Lifecycle Management.

WiX Tips and Tricks: Part 1 - Installing a shortcut for "All Users"

I've been using the excellent WiX a fair amount recently to create an installer for our Scrum plug-in for Microsoft Visual Studio Team System , and will try and jot down a few hints and tips I've discovered along the way.

The first one is a hint for when you want to install a shortcut into "All Users\Programs\YourProduct" rather than the start menu of the user performing the installation (i.e. you are using the built in Wix_Minimal or Wix_FeatureTree UI references)

In your .wxs file, include the following:

<Property Id="ALLUSERS"><![CDATA[2]]></Property>

This will preset a property which mimics the behaviour of selecting the "All Users" rather than "Just Me" for your installation.  You'll need a directory structure similar to the following too:

<Directory Id='ProgramMenuFolder' Name='PMenu' LongName='Programs'>
    <
Directory Id='MyProductShortcutDir' Name='MyPMenu' LongName='MyProduct' />
</
Directory>

Finally, your shortcut should be within a "File" element, as follows:

<File Id="MyProduct.File0" LongName="MyProduct.exe" Name="MYPROD_1.EXE" src="c:\MyProductSourceFolder\MyProduct.exe" >
    <
Shortcut Id="MyProduct.Shortcut" Directory="MyProductShortcutDir" Name="MPSCUT" LongName="My Product Shortcut" />
</
File>
Published 06 December 2005 21:28 by Stuart.Preston

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Howard van Rooijen's Blog said:

Today marks the end of the 3rd Sprint of development on the Scrum Plug-In for Visual Studio Team System....
December 9, 2005 21:54
 

Howard van Rooijen's Blog said:

Today marks the end of the 3rd Sprint of development on the Scrum Plug-In for Visual Studio Team System....
March 3, 2006 22:29

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server (Personal Edition), by Telligent Systems