![Guide to Generating Global Shortcut Keys via WiX: No Commercial Prompts Included](https://thmb.techidaily.com/5a94426a32501655e657a3254c012c85eb00e68b90f4fb83cdfc375f3ce534ef.jpg)
Guide to Generating Global Shortcut Keys via WiX: No Commercial Prompts Included
![](/images/site-logo.png)
Guide to Generating Global Shortcut Keys via WiX: No Commercial Prompts Included
Inno Setup
WiX Toolset
InstallShield
MSIX 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:
- [Updated] Elevate Your YouTube Presence with These 8 Free Courses for 2024
- [Updated] Insta Prowess Guide The 9 Secrets Behind Top Posters' Success
- Anticipating the Release of Apple's New Sound-Integrated Gadget: Cost Projections, Scheduled Launch Date, Features Overview & Secret Rumors
- Creating & Activating System Restore Points on Windows 11: A Comprehensive Guide
- In 2024, How to Track Vivo Y55s 5G (2023) Location by Number | Dr.fone
- Rapidez Au Détriment De La Souplesse : Comment L'accélération Du Processus Douanier À La Frontière Royaume-Uni/UE Affecte Le Commerce
- Soundscapes Synergy Ideal DJ Videos to Download
- Stratégies D'Adoption Des Technologies Dans L'Industrie De L'Assurance : Un Plan Détaillé
- Streamlining Success: Your Ultimate Roadmap for Synchronizing Human Resources, Procedures & Information in Automation
- The Photo Keeper’s Companion Unlimited Free Options & Elite Subscription Saviors
- Tricks for Stealthy Login: Silencing Security Prompts in Windows 11
- Valider Les Pièces D'identité À Distance Grâce À La Technologie De Reconnaissance Optique De Caractères (OCR) De ABBYY Avec Le Système TrustID en Nuage
- Title: Guide to Generating Global Shortcut Keys via WiX: No Commercial Prompts Included
- Author: Donald
- Created at : 2024-09-26 16:12:29
- Updated at : 2024-10-03 18:51:11
- Link: https://some-tips.techidaily.com/guide-to-generating-global-shortcut-keys-via-wix-no-commercial-prompts-included/
- License: This work is licensed under CC BY-NC-SA 4.0.