+ Reply to Thread
Results 1 to 6 of 6

Thread: Get Registry Subkey bug?

  1. #1

    Default Get Registry Subkey bug?

    If this problem has been previously reported, I apologize for the duplication, but I've searched through the forum and haven't found any
    similar references to this problem. I've noticed recently that there seems to be a minor problem with the Get Registry Subkey command. I honestly don't know if this error popped up after the recent v8.5 update or if it has been a problem before that update.

    To illustrate the problem, I'm going to use the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList registry key, which looks like
    this:

    - ProfileList
    S-1-5-18
    S-1-5-19
    S-1-5-20
    S-1-5-21-443186426-36040666280-3422536360-500
    S-1-5-21-602162358-1060284298-1801674531-1406

    Specifically, invoking the Get Registry Subkey command with a Subkey ID of "0" brings back correctly brings back a value of "5" since there
    are 5 subkeys beneath the \ProfileList key. However, when you increment that Subkey ID by a value of 1, the next iteration of Get Registry Subkey does not bring back a value of "S-1-5-18" as it should -- it brings back a value of "S-1-5-19". For some reason, there doesn't seem to be a way to bring back the value of the first subkey beneath a key. The code I used is below and is actually almost identical to the example code in the Forum and also in the Reference manual for enumerating a registry key. I've already had one other SetupBuilder developer verify this, but I thought it should be submitted to the Forum for additional verification.


    Set Variable %NUM_SUBKEYS% to FUNCTION:Get Registry SubKey("0") from "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"

    Display Message Box "The number of subkeys = %NUM_SUBKEYS%" -- "Number of Subkeys"

    Set Variable %LOOPCTR% to "0"

    Loop (%NUM_SUBKEYS% Times)
    Set Variable %LOOPCTR% to (Increment by 1)
    Set Variable %WORK_SUBKEY% to FUNCTION:Get Registry SubKey("%LOOPCTR%") from "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"
    Display Message Box "This is loop iteration #%LOOPCTR%\nThe retrieved s..." -- "Loop iteration"
    End

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Get Registry Subkey bug?

    Hi Jerry,

    This is definitely a bug in the SetupBuilder runtime It's caused by the following:

    SetupBuilder 2015 Version 8.5 Build 4714 (March 06, 2015)
    NEW : Installer: Add an enhanced "Get Registry SubKey..." script function to improve performance dramatically (and fixes an annoying memory leak).


    Thank you for bringing this to our attention. It's fixed now (the new maintenance build will be made available later today).

    Thanks again!

    Friedrich

  3. #3

    Default Re: Get Registry Subkey bug?

    Just glad it was apparently easy for you to fix. Thought for a day or two that I was going crazy and it was time to hang it up, move to a beach, and just sell t-shirts.

  4. #4
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Get Registry Subkey bug?

    <BG>

    The new SetupBuilder Developer Edition 8.5 Build 4754 is available now. Does this fix it for you?

    Thanks,
    Friedrich

  5. #5

    Default Re: Get Registry Subkey bug?

    Works just fine now. Thanks for the quick response and action.

  6. #6
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Get Registry Subkey bug?

    Thank YOU !!!

    Friedrich

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •