Our original MSI builder had an option to create a shortcut to the packaged executable. One shortcut was enough for the intended purpose, but with the ever-growing complexity of PowerShell applications, something more was needed.
With the latest service builds of PrimalScript and Powershell Studio, we added the ability to create multiple shortcuts to multiple files in your Windows Installers. So you can finally have a Start Menu and a Desktop shortcut. Or launch the same application with different parameters.
Unfortunately, that also means you need to adjust all your installers when you rebuild them.
You can find the space to define Shortcuts under the correspondingly named item in the left-hand task panel.
Adding a shortcut is simple: right-click on a folder and select “Add Shortcut.” The company folder name is automatically added using the name from your installer settings.
If you want the same shortcut in your company folder and on your Desktop, simply copy the existing one and paste it in the other location (this is not using the Windows clipboard).
The green highlights in the image below indicate the minimum fields needed. The shortcut target, meaning the file executed, should be one of the files installed. You can add a shortcut to an existing file on a target machine, but be aware that MSI will simply omit shortcuts to non-existing files without any error message. Therefore, if a shortcut does not appear after installation, it usually means something with the name or the path is wrong. You can use the “…” button to select a file, which cuts down on typos.
The ‘Working Directory’ indicates what the process’ current folder will be. For some applications, that is completely irrelevant; for others, it is vital. You need to know what your application needs.
Why is INSTALLDIR in square brackets in one field and not the other? Just one of the little inconsistencies of the WiX Toolset. Don’t worry about it; the sample below is correct.
The selection dialog for the Shortcut target shows the files add to your installer. The ‘Source’ folder has no bearing on the shortcut settings; it indicates the source location for the file(s) added to the MSI file.
The folder selection dialog shows you the folders you can select as a working directory. At the moment, you should only use these folders; using a different, custom folder may result in a build error. Future versions of this will allow you to add and specify any folder.
Comments, Questions? Please feel free to add them here in the blog or, even better, post in our support forum.