Indigo Rose Software

Go Back   Indigo Rose Software Forums > Old Versions > TrueUpdate 2.0

 
 
Thread Tools Display Modes
  #1  
Old 12-05-2005
bnasmmbaker bnasmmbaker is offline
Forum Member
 
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  
Old 12-07-2005
Mark's Avatar
Mark Mark is offline
Indigo Rose Staff Member
 
Join Date: Jun 2000
Location: Indigo Rose Software
Posts: 1,773
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
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
New Setup Factory 7.0 (v 7.0.3.0) Available Darryl Setup Factory 7.0 Discussion 3 06-19-2005 01:59 AM
New Setup Factory 7.0 (v 7.0.2.0) Available Darryl Setup Factory 7.0 Discussion 9 03-06-2005 02:57 PM
AutoPlay Media Studio 4.0.0.4 Released Colin AutoPlay Media Studio 4.0 0 04-01-2003 11:16 AM
AutoPlay Media Studio 4.0.0.3 Released Brett AutoPlay Media Studio 4.0 0 12-11-2002 09:39 AM


All times are GMT -6. The time now is 05:24 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software