Indigo Rose Software
  #1  
Old 09-27-2004
Sheritlw Sheritlw is offline
Indigo Rose Customer
 
Join Date: Sep 2004
Posts: 25
Registry SubKey w/ Variables

How do you use variables in subkeys.
I've tried several combinations to see if I could get the results I'm looking for and haven't had any success yet. Below is an example of my last attempt.
Any suggestions?

Registry.SetValue(HKEY_USERS, ".DEFAULT\Software\SessionVar.Expand(%CompanyName% )\SessionVar.Expand(%RegistryName)", "Version", SessionVar.Expand("%ProductVer%"), REG_SZ);
Reply With Quote
  #2  
Old 09-27-2004
Ted Sullivan's Avatar
Ted Sullivan Ted Sullivan is offline
Indigo Rose Staff Member
 
Join Date: Oct 2003
Posts: 825
Try this. It should do what you want. It assumes that you have set the session variables %CompanyName% and %RegistryName% at some previous point.

Code:
SubKey = ".DEFAULT\\Software\\" .. SessionVar.Expand("%CompanyName%") .. "\\" .. SessionVar.Expand("%RegistryName");
Value = "Version";
Data = SessionVar.Expand("%ProductVer%");

Registry.SetValue(HKEY_USERS, SubKey, Value, Data, REG_SZ);
Here is a link to more information and examples on using the actions SessionVar.Expand and Registry.SetValue.
__________________
Check out the new MSI Factory 2.0!
Reply With Quote
Reply

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
Variables In Registry Actions Waza04 Setup Factory 7.0 Discussion 2 09-24-2004 10:22 AM
INFO: Setting Environment Variables Support Setup Factory 6.0 Knowledge Base 0 10-10-2002 01:07 PM
Variables and registry gena Setup Factory 6.0 0 12-10-2001 04:25 AM
Registry Variables Problem shenjengjie Setup Factory 5.0 2 10-31-2001 08:01 AM
Problem with Registry Variables marcus Setup Factory 5.0 3 10-25-2000 09:52 AM


All times are GMT -6. The time now is 08:37 PM.


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