Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Posts
    12

    Possible bug in SessionVar.Expand

    Hello,
    I came across an odd bug in use of SessionVar.Expand. The expansion takes place, and I get what looks like a valid string using Debug.Print. However, passing this value to Registry.GetValue results in a no key found error. If I replace SessionVar.Expand with SessionVar.Get and just use string concatenation, it works just fine.

    Buggy code:
    g_RegRoot = SessionVar.Expand("Software\\BNA Software\\%ProductName%\\Application State";
    Debug.Print( g_RegRoot );
    local v = Registry.GetValue(HKEY_CURRENT_USER,g_RegRoot,"Set ting",false);


    Good code:
    Buggy code:
    g_RegRoot = "Software\\BNA Software\\"..SessionVar.Get("%ProductName%").."\\A pplication State";
    Debug.Print( g_RegRoot );
    local v = Registry.GetValue(HKEY_CURRENT_USER,g_RegRoot,"Set ting",false);

    Thanks
    Mark

  2. #2
    Join Date
    Jun 2000
    Location
    Indigo Rose Software
    Posts
    1,943
    Hi bnasmmbaker,

    I've tested this out and have not been able to make it fail, using your code below on a TrueUpdate 2.0 registry key.

    If the string g_RegRoot is correct when it gets passed to Registry.GetValue() it should not matter how it was created. Are you sure that the g_RegRoot value is the same with each creation method?

    If you can create a script that fails on a common registry key, please post it here and we will use it to debug this issue.
    MSI Factory The Next Generation Intelligent Setup Builder

Similar Threads

  1. New Setup Factory 7.0 (v 7.0.3.0) Available
    By Darryl in forum Setup Factory 7.0
    Replies: 3
    Last Post: 06-19-2005, 12:59 AM
  2. New Setup Factory 7.0 (v 7.0.2.0) Available
    By Darryl in forum Setup Factory 7.0
    Replies: 9
    Last Post: 03-06-2005, 01:57 PM
  3. AutoPlay Media Studio 4.0.0.4 Released
    By Colin in forum AutoPlay Media Studio 4.0
    Replies: 0
    Last Post: 04-01-2003, 10:16 AM
  4. AutoPlay Media Studio 4.0.0.3 Released
    By Brett in forum AutoPlay Media Studio 4.0
    Replies: 0
    Last Post: 12-11-2002, 08:39 AM

Posting Permissions

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