Windows 7 MSI Fix tintag add HKCU Healing Action
Tinytag explorer for whatever reason thought it best the user should need to enter the registration code, rather than it being part of the machine via HKLM, helpful.
I use this as an example of how to use an advertised shortcut to 'heal' the code into the HKCU when the shortcut is clicked on.
i.e. you will get the Windows installer pop up when a new user first clicks on the shortcut to start the program.
This adds the software's activation code to the HKCU (Root 1), the Primary Key [Registry column] is called 'code' (See Component table)
A new Component is added called 'code' with a randomly made ComponentID 'some random GUID', Attribute '0x004', KeyPath 'code' [ = Primary Key in registry table called 'code' ]
- Attribute bit flag 0x004 = KeyPath is in the registry table (msidbComponentAttributesRegistryKeyPath)
This just creates a new Feature called 'CurrentUser' with a Component called 'code'
A new Feature is created called 'CurrentUser' which is the new root (null Feature_Parent)
The original entry Feature 'Product' is changed to no longer be the root and instead be a sub-feature under the Feature CurrentUser (the Feature_Parent)
- Having only HKCU keys makes it not need source MSI or admin/install permissions to heal
aka the 'Entry Point' or 'Advertised' feature. This is unchanged.
- Note the Feature this is part of (Target) is called 'Product'. (See Feature table).
How it works
Entry point is triggered (The desktop shortcut), this makes the MSI enumerate the Feature this shortcut is in which is 'Product'. Then it checks its parent Feature called 'CurrentUser'. The primary key of each component is checked within these to make sure it exists. When it gets to the component 'code' it will see the keypath of this pointing to the Registry Table (Primary Key) [also called] 'code'], which is a HKCU, doesn't exist, and thus create it.
- If it finds one thing missing it will fix the whole Feature, not just the missing bit. Thus separating the HKCU bits to their own Feature (CurrentUser) makes healing that alone quick.
This contained two fixes for tinytag (unrelated to the HKCU healing);
- silent install ignored the target path change and caused a silent install to dump everything to the root of C !
- remove the pointless reboot action
For a more in depth explantion but without a pictoral example this is well worth a read
Commentsblog comments powered by Disqus