|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
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 |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
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.






Linear Mode

