Summary
This article will cover how to use Windows Active Setup feature to repair user settingsSynopsis
This article will cover how to use Windows Active Setup feature to repair user settingsDiscussion
The Windows Installer service will install the user-specific data only for the profile of the account under which the application is being installed. So, if another user logs into the machine, that user data is unavailable to the new user.It is typically recommended to use advertised shortcuts as an entry point to trigger the repair. A Windows Installer advertised shortcut causes Windows to verify that all of the application's component key paths are in place before launching the application. If a key path is missing, Windows Installer will try to repair the application before launching the program. This method works well for repairing user-specific data if the application has shortcuts, but this will not always be the case. For these cases, Windows offers the Active Setup feature through some registry keys. There are two registry keys that Windows uses to decide whether an application is installed for a user as they are logging into Windows. The concept here is that you will create a per-machine registry key in HKEY_LOCAL_MACHINE and then compare that key with a similar key in HKEY_CURRENT_USER. If the version information in the keys is different, then Windows runs a command specified in the HKEY_LOCAL_MACHINE key and updates the version data so that the command does not run again.
To set this up with your install you will need to add some registry data into your InstallShield project. The installer will need to write to the following registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\[ProductCode]
With the following value:
"@"=[ProductName] "StubPath"="msiexec.exe /fou [ProductCode] /qb" "Version"="1,0,0"
Once these are added in InstallShield it should look something like:
Once this is setup when the end user logs into the computer Active Setup will compare the registry data in HKLM with the corresponding key in HKCU, and if he version in HKCU is less than the one in HKLM or the HKCU key does not exist, Windows will copy some of the values from the HKLM key to the HKCU key and then execute the command in the "StubPath" value.
At some point the original user that did the initial install will need to log off and log back onto the computer. In this case the Active Setup may run a repair under this user even though it is not necessary. To get around this you will want to also add a registry key and value under the HKCU hive. This would be in the following key:
HKEY_CURRENT_USER\Software\Microsoft\Active Setup\Installed Components\[ProductCode]
With the following value:
"Version"="1,0,0"
Once this is added in InstallShield it should look something like:
Once this is done the user that did the first time install should be able to log off and back on without triggering the repair. Any other user should see the Windows Installer repair dialog once they login, and Windows has determined that the Active Setup should be run.
The last thing to note will be to ensure that the Windows Installer will be able to locate the source media to complete the repair. If Windows Installer needs the source media, but cannot find it, the end user will be prompted to browse to the source media. To get around this you can place the source media where you would like, for example on a network share, and then specify this location in the SOURCELIST property in your installer. If you do not have network access in your environment you can copy the source to a common accessible location on the machine, for example a location like:
[CommonAppDataFolder]\[Manufacturer]\[ProductName]
Which should resolve to something like:
C:\ProgramData\MyCompany\Active Setup Sample
Related Documents
Related Articles
"License is Linked to an Application without Evidence" alert when all linked applications have evidence 35Number of Views Step by Step: How to repair client side borrowed TS license 8Number of Views Application Continues To Reinstall Itself When Launched 6Number of Views How to Create Desktop Shortcuts in a MSIX Project Using the Package Support Framework 13Number of Views Add a local application without recognition rules in Snow License Manager 206Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago