Scripting Question

Does a HKCU registry change requires Active Setup?

07/10/2012 7930 views

Hi everyone, One of my application needs a "HKCU\Software\XXX\VersionCheck\" registry change from "1" to "0". So If I change this registry in mst file do I need to setup an "Active Setup" to apply this registry chenge to effect every user who logged into that machine?? or If I run a batch file after the installation to change that registry value will it be effected to per machine???

Thanks in advance

Answer Summary:
0 Comments   [ + ] Show comments


Community Chosen Answer


Do you have a Advertised Shortcut in your package?

Answered 07/10/2012 by: jagadeish
Red Belt

  • If so, You no need to write ActiveSetup key to modify the existing HKCU value

    Edit your existing MSI with the new value..
    Create an another component with some dummy HKCU key
    (For Ex: HKCU\Software\Your Application\
    ProductVersion = [ProductVersion] )

    Set as KeyPath

    Install the msi with following command line

    msiexec /i "MyUpdatedMSI.msi" REINSTALL=ALL REINSTALLMODE=voums /qb
  • Hii Jagadeish, I tried to workout in the way mentioned above but here I didn't ubderstand the concept of creating an another component with some dummy Key and set as key path...
    If u dnt mind could you elaborate that...
    I understood that in this way-
    1) change the HKCU value with the value I need in .mst
    2) create a registry like "test.reg" in that mention the key I need to change with the new value
    3) Key Path >>> ?? (actually didn't understand this)
    4) now installthe msi with switches you mentioned over there (I got this it repairs the msi for each user who logged into the same machine)
  • I have updated my above post long back but it is not reflecting there..

    Let me tell you now..

    1) Update the registry with the new value in your mst
    2) Create an another component named NewValue (Something like this) and add a dummy HKCU registry in that component
    For Example:
    HKCU\Software\Your Application

    3) Set the above registry key as KeyPath

    4) Make sure you have added the above component in same feature, also that advertised shortcut is present in the same feature

    5) Install the msi with following command line

    msiexec /i "VendorMSI.msi" TRANSFORMS="MyUpdatedMST.mst" REINSTALL=ALL REINSTALLMODE=voums /qb
  • Why I have asked you to create an another component with dummy registry key with KeyPath

    Here is the answer

    Bcoz, This particular HKCU key will not be there in the target machine before. When you launch the Advertised shortcut, windows installer will initiate the self-heal process for this newly added dummy key as you have set it as KeyPath

    At that time the whole feature will be reinstalled.. You will get the updated key along with this dummy key..
  • yep now tried as you mentioned and solved it... Thanks alot

All Answers


Only to the particular user that logs on to  the machine.

same problem as


Answered 07/10/2012 by: SMal.tmcc
Red Belt

  • On a machine with this software installed you can try to export that key set and change the keys from hkcu to hklm and remerge it. Then delete the "versioncheck" under hkcu and restart and start the software to see if it works. I have had this trick work a couple of times for hkcu keys. If it is a new machine with no user profiles yet you can modify the default users keyset so then everyone gets the keys.
    If it is for existing machines there are a couple of solutions on the above link.
  • If you are in a domain use a GPO to change the key for the users and you are done.

yes I have advertised shortcut here, but I did in this way.. created a "regestrykey.reg" and a "test.vbs" file, And I copied there 2 files into INSTALLDIR folder by using installshield in .mst then ran an Active setup in this way

stubpath="cscript.exe "[INSTALLDIR]\test.vbs""

is this a correct way of changing the HKCU registry?? that regestry.reg consists of the change required

Answered 07/10/2012 by: ontari.ontari
Black Belt

  • Are you running this for every user or just the current logged in user? You may need to run your script for every user. Run it on one user and then login as another user and see if they get the same error
  • yes I checked it, the registry value changed when I logged in as a other user that means active setup is applying for the all the users who ever logged in to it. I can see when I am logging in as a other user its taking more time than normal user logging time after instaling this applicaaiton...
  • Writing ActiveSetup is not a good practice. It should be used only when there is no other option.. It will cause delay in logging time.. That too for newly created users it is very strange..
  • Thanks for the valuble suggession Jagadeish... ll try to work out you mentioned above

Thanks alot guys Issue solved, Thanks alot Jagadiesh and SMal.tmcc for your suggessions.. 

Answered 07/10/2012 by: ontari.ontari
Black Belt


If you have Advertise shortcut in the package then on the first launch of the shotcut application will go for self heal and HKCU enteries will get reflected (you need to include those HKCU registries in MST).

If you don't have advertised shorctcut the Active setup is the best option.

Answered 07/13/2012 by: vmnit
Third Degree Blue Belt

This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ