Building Universal Shortcuts Without Ads Using the WiX Toolset: A Step-by-Step Guide
Building Universal Shortcuts Without Ads Using the WiX Toolset: A Step-by-Step Guide
Inno SetupWiX ToolsetInstallShieldMSIX Packaging Tool
Check your inbox and confirm the
subscription
Exclusive Newsletter
Exclusive Newsletter
Get the latest WiX insights direct to your inbox. Subscribe now!
Disclaimer: This post includes affiliate links
If you click on a link and make a purchase, I may receive a commission at no extra cost to you.
How to create non-advertised shortcuts for all users / per machine with WiX Toolset
When you define shortcuts in WiX Toolset, their default installation is non-advertised (Standard Shortcuts).
Even though this characteristic shouldn’t be a serious issue, it can be a source of ICE errors in some instances (for example, when you define components that have both per-user and per-machine data, with a per-machine keypath).
This article will show you how to fix ICE errors when creating non-advertised shortcuts using the WiX Toolset.
Advertised vs. Non-advertised shortcuts
What is an advertised shortcut?
Advertised shortcuts are helpful for developers when making sure a software is installed and running as intended, without any missing pieces.
When an advertised shortcut is launched, Windows Installer checks to see if all the components included in the same feature as the shortcut are installed on the device. If that’s not the case, the shortcut will automatically launch the MSI from which the program was installed and reinstall the .msi file missing resources.
What is a non-advertised shortcut (Standard Shortcut)?
We call a non-advertised shortcut (Standard Shortcuts) a standard Windows shortcut. In this case, you can see the target field points to the executable that will be launched if you right-click on it. If this executable is missing for any reason, the application will immediately crash.
How to create non-advertised shortcuts?
According to ICE43 , Microsoft recommends using separate registry keys in the HKCU (HKEY_CURRENT_USER) as keypaths of the non-advertised shortcuts.
To implement this method, you only need to create a new component where you will build the shortcut and the registry value that will serve as the shortcut’s keypath.
This method is actually very simple to implement. All you need to do is create a new component where you will build the shortcut and the registry value that will serve as the shortcut’s keypath.
Copy
Keep in mind that his method forces you to add registry entries in your setup package, which may not be as practical in a multi-user scenario. This means that if a user uninstalls the application, all the other users will have orphaned registry entries in their respective HKCU hives.
A major difference between advertised and non-advertised shortcuts is the use of files (that are already installed per machine) as keypaths – which is not possible for non-advertised shortcuts.
To overcome this situation, we will turn an advertised shortcut into a non-advertised one.
Let’s get started!
First, declare the shortcut using the following lines:
Copy
We have created a new advertised shortcut in our component which uses a file as a KeyPath.
Now, we will use the DISABLEADVTSHORTCUTS property to turn our advertised shortcut into a non-advertised one, bypassing the ICE43 condition.
Copy
That’s it! By adding this line of code into your WiX project, you can turn any advertised shortcut into a non-advertised one without declaring additional registry entries for each shortcut.
How to create a non-advertised shortcut with Advanced Installer
Through Advanced Installer’s GUI, you have a straightforward way to generate non-advertised shortcuts without using any code.
1. Go to the Shortcuts Page and create a new shortcut for an installed file.
2. In the shortcut’s properties, you can use the “Advertised Shortcut” checkbox to make your shortcut an advertised one. (This option is unchecked by default, leave it as it is to create a non-advertised shortcut).
3. To place the shortcut on the Desktop go to the Paths section.
4. Once in the Paths section, change the Shortcut folder option from SHORTCUTDIR to DesktopFolder.
5. To make sure that your setup package is ICE valid, go to: File - Settings - Package Validation
6. In the Build Settings section, check the “_Enable ICE validation for MSI packages_” checkbox.
Done!
Check out Advanced Installer’s friendly GUI through our 30-day full featured trial . (No credit card required)
Conclusion
Now we know how to avoid ICE errors by creating non-advertised shortcuts with the WiX Toolset.
Of course, you can always choose a tool that doesn’t require any code to create non-advertised shortcuts, such as Advanced Installer.
We hope you found this article useful.
Advanced Installer #1 alternative to the WiX Toolset
We decided to focus on our main goal to save precious time of our developers.
HANS-LEO TEULINGS
PHD – CEO, NEUROSCRIPT, LLC
You might find useful:
- CAB Embedding Options in MSI
- Updated installers in WiX Toolset
- Custom Actions In WiX Toolset
- Windows Services with WiX Installer
- Set WiX Installer Version to the Current Build Version
- Remove Files and Folders when Uninstalling with WiX
- How to set a WiX Toolset custom action to run only on uninstall
- How to create non-advertised shortcuts for all users / per machine with WiX Toolset
- How to Remove Files on Uninstall Using WiX Toolset
- How to create major upgrades for MSI packages using WiX Toolset
- How to pass CustomActionData to a CustomAction using WiX
- How to build an installer without a license page using WiX Toolset
- How to create a WiX KeyPath attribute
- How to Create a Desktop Shortcut using WiX Toolset
- How to Use WiX MSI to Update an Installed Application
- How to correctly set the install folder in Wix
- WiX Toolset Visual Studio Extension
- How to create a custom dialog in WiX for user input
- How to create an MSI installer with WiX
- How to use WIX MSI to do a silent install or uninstall of a web app
Get the most from packaging with Advanced Installer
Try the 30-day fully-featured edition absolutely free!
No credit card required
Also read:
- [New] 2024 Approved Turn On Google Meet Grids to See All Attendees
- [New] From Raw to Masterpiece The Premier Free Mobile Editors for Android for 2024
- [New] In 2024, 13 Best Ways to Make Money on Reddit - No Experience Needed
- [Updated] Revolutionary Process to Blend GoPro Videos Into 360-Degree Panoramas
- 10 Reasons Why You Should Learn Afrikaans
- 2024 Approved Basic Equipment for Travel Video Creators
- Crack the MS PC Manager Install Issue on Windows XP
- Navigating Tomorrow: COSMIC as Your Gateway to the Next-Gen Linux Experience
- Sonos's Outdoor Audio Triumph: A Compreran Report
- Step-by-Step Tutorial: Configuring Mac's Network Drive Access
- Top 8 Essential Steps for Optimizing Your New Windows PC
- Top 9 Methods for Accessing PowerShell on Windows 10
- Transitioning Kodi: The Shift From Debian Packages to Flatpak on Linux Systems
- Ultimate Selection: Premium Mac Screens and Monitors
- Uncover Hidden Gems: Essential Yet Overlooked Windows Shortcuts
- Understanding Batch Files: A Comprehensive Guide on What They Are & How To Access Them
- Unlocking Performance Secrets - Tom's Equipment Rundown
- Unlocking the Secrets: 13 Quick Methods to Access Windows 10 Settings
- Your Comprehensive Guide to All the Top Highlights From Apple's Worldwide Developers Conference 2024
- Title: Building Universal Shortcuts Without Ads Using the WiX Toolset: A Step-by-Step Guide
- Author: Donald
- Created at : 2024-09-27 17:55:16
- Updated at : 2024-10-03 17:49:43
- Link: https://some-tips.techidaily.com/building-universal-shortcuts-without-ads-using-the-wix-toolset-a-step-by-step-guide/
- License: This work is licensed under CC BY-NC-SA 4.0.