sparks
sparks

Reputation: 1294

WiX: How do I create Start Menu shortcut without placing it in a folder?

I'd like to create a Start Menu shortcut to my application at the top most level of the Start Menu using WiX. Specifically, I been using this example from the WiX documentation which places the application shortcut in a new folder and trying to modify it without success: How To: Create a Shortcut on the Start Menu. The complete example code is at the bottom of the page. Thank you in advanced.

Upvotes: 3

Views: 989

Answers (1)

sparks
sparks

Reputation: 1294

I figured it out. Here is the example code modified to place the shortcut in the root of the Start Menu. You need to modify two places:

When defining the directory structure for the start menu, do not create a new folder.

<!-- Step 1: Define the directory structure -->
<Directory Id="ProgramMenuFolder">
    <!-- FOLDER HAS BEEN REMOVED FROM HERE -->
</Directory>

When adding the shortcut to the installer package, point at the ProgramMenuFolder in the DirectoryRef tag:

<!-- Step 2: Add the shortcut to your installer package -->
<DirectoryRef Id="ProgramMenuFolder">
    <Component Id="ApplicationShortcut" Guid="PUT-GUID-HERE">
        ...
    </Component>
</DirectoryRef>

Upvotes: 4

Related Questions