Remove HKCU registries from all users
About
This is a custom predefined action created by the Master Packager team that removes specific HKEY_CURRENT_USER registries from all users during SYSTEM context installation.
The action works by modifying the ntuser.dat file for each user profile (including default user) and removing the specified HKCU registry entries from it. This ensures that any new user who logs into the machine will not receive these registry keys in their profile.
This approach allows removing per-user configuration even when the MSI is installed or uninstalled under SYSTEM context, which is commonly used in enterprise deployments.
When to use it?
Use this action when it is needed to remove per-user HKEY_CURRENT_USER (HKCU) registries from all users while the MSI is installed or uninstalled under SYSTEM context.
This is commonly required when application configuration stored in HKCU needs to be removed or reset for all users.
How to use it?
- Open MSI/MST with Master Packager
- Click on Custom Actions in left menu
- Click on Predefined Actions tab
- Click “Add Predefined Action” and choose “Remove HKCU registries from all users”
- Click Browse HKCU .reg file or click edit
Format must be following:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SomeKey]
Be careful: Any key listed in the action will be removed.
