Search code examples
visual-studiosetup-projectvisual-studio-2022

How to add program to users program menu in VS2022 Installer projects?


How do I add a program to my target user's program menu using Visual Studio 2022 setup project? Any way to do it would be great.


Solution

  • Assuming you want a shortcut to a program that is part of the installer package (most likely in the "Application Folder"), then you can use the following steps:

    1. Open the "File System" view for your installer project (right-click on the project in Solution Explorer and select the "View -> File System" command from the pop-up menu).

    2. Select the "User's Programs Menu" in the left-hand pane of that view, then right-click anywhere in the right-hand pane; you should then see a pop-up menu with a "Create New Shortcut" command (similar to that shown below)

    enter image description here

    1. Select this command; then, in the dialog box that follows, navigate to the target (executable) for the shortcut and click "OK". A shortcut to that item will then appear in the right-hand pane of your File System View, which you can rename as with any other file in Windows.

    To add an icon for the shortcut, select that new item in the right-hand pane and then, in the "Properties" window, select "Browse" from the "Icon" property. You can browse for an icon in the target file system – but note that, by default, only "*.ico" files are shown; you need to select "All Files" or "Executable Files" in the pop-up dialog if you want to find the target program and use that file's default (i.e. lowest ID number) icon.