Indigo Rose Software
  #1  
Old 10-04-2004
brianlesker brianlesker is offline
Forum Member
 
Join Date: Oct 2003
Posts: 49
Huh? Using VARS in Registry.GetValue

Why doesn't the following work:

Code:
strInstallType = "les";

strProgrammatuurCopy1 = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\Impulse\\User\\"..strInstallType, "prog_loc1", true);
Reply With Quote
  #2  
Old 10-04-2004
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
The assumption being that:

HKEY_LOCAL_MACHINE\\Software\\Impulse\\User\\les

has a value of "prog_loc1" in the registry?

I would suggest have a Application.GetLastError in there somewhere to find out what happened. Are you sure the key exists otherwise it will return an empty string.

John
Reply With Quote
  #3  
Old 10-05-2004
brianlesker brianlesker is offline
Forum Member
 
Join Date: Oct 2003
Posts: 49
Yeah, registy value exists, registry-dump:

[HKEY_LOCAL_MACHINE\SOFTWARE\Impulse\User\prod]
"db_naam"="whoesh"
"db_versie"="4403"
"db_update"="FALSE"
"help_versie"="FALSE"
"prog_loc1"="J:\\au-test\\user"

Application.GetLastError(); return 0

Last edited by brianlesker; 10-05-2004 at 02:03 AM.
Reply With Quote
  #4  
Old 10-05-2004
Laslie Toth Laslie Toth is offline
Indigo Rose Customer
 
Join Date: Feb 2001
Location: Hungary Budapest
Posts: 54
[HKEY_LOCAL_MACHINE\SOFTWARE\Impulse\User\prod] but you wrote strInstallType = "les";
Reply With Quote
  #5  
Old 10-05-2004
brianlesker brianlesker is offline
Forum Member
 
Join Date: Oct 2003
Posts: 49
les & prod are both avaible, sorry for the incorrect example

But both value's exist!
Reply With Quote
  #6  
Old 10-05-2004
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
What happens if you do not assign "les" to a variable but include it directly as part of the Registry.GetValue command directly?

John
Reply With Quote
  #7  
Old 10-05-2004
brianlesker brianlesker is offline
Forum Member
 
Join Date: Oct 2003
Posts: 49
Then i get my registry value. Stupid he?
Reply With Quote
  #8  
Old 10-05-2004
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
Also just to confirm you are running as Admin-equivalent if on a NT-based system although can't see why that would make a difference if it works this way?

I'll have a quick test in a moment with your example registry section and see if I can replicate. Watch this space.

John
Reply With Quote
  #9  
Old 10-05-2004
brianlesker brianlesker is offline
Forum Member
 
Join Date: Oct 2003
Posts: 49
pfff! i'm to stupid, i didn't saw a fault from all my debugging code.

I have resolved the problem.

That's me, to stupid.

Sorry....nuf said.
Reply With Quote
  #10  
Old 10-05-2004
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
OK as I was about to say my test worked fine.

John
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
runtime source vars substitution jmnavarro Setup Factory 6.0 2 02-26-2003 01:56 AM


All times are GMT -6. The time now is 10:22 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