IPB

Google Frontpage Forums Unattended CD/DVD Guide
 
Reply to this topicStart new topic
> Problem with RegKeyValue, ?? what does it return ??
Iskander Novena
post Jul 21 2008, 08:52 AM
Post #1


Newbie


Group: Members
Posts: 10
Joined: 18-July 08
Member No.: 201398
OS: Vista Ultimate x64
Country Flag


I've got a problem with the RegKeyValue-option in either Condition or Greyedout Condition.
I use the following:
CODE
RegKeyValue("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\RegisteredOrganization")=="Organisation"

Where, in my registry, my registered organisation is the value that is checked against.

However, either when in Condition or Greyedout Condition, this does not trigger!
Also tried with the full root (HKEY_LOCAL_MACHINE) but that does not make any difference...
Go to the top of the page
 
+Quote Post
mritter
post Jul 21 2008, 04:09 PM
Post #2


WPI Co-Developer
Group Icon

Group: Software Developers
Posts: 654
Joined: 13-November 05
From: Bettendorf, IA
Member No.: 79628
OS: Vista Home Premium x64
Country Flag


Cond/GCond is a strange beast. Try it this way:

CODE
RegKeyValue("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\RegisteredOrganization") != "Organisation"


It is like it wants the opposite of what you think it is.


This post has been edited by mritter: Jul 21 2008, 04:10 PM
Go to the top of the page
 
+Quote Post
Iskander Novena
post Jul 22 2008, 12:34 AM
Post #3


Newbie


Group: Members
Posts: 10
Joined: 18-July 08
Member No.: 201398
OS: Vista Ultimate x64
Country Flag


I know, but however I set it, it does not trigger.
I know the value is Organisation, but when I set the condition to check for RegKeyValue("HKLM\...\Organisation") == "Organisation" and thus only show the option if this condition is true, the program does not list.
When I set this exact same thing to gcond, it does not get grayed out.

I absolutely know that I'm checking for the value that is in the registry on the machine I test it on, but can't get it to work....
Go to the top of the page
 
+Quote Post
mritter
post Jul 22 2008, 03:57 PM
Post #4


WPI Co-Developer
Group Icon

Group: Software Developers
Posts: 654
Joined: 13-November 05
From: Bettendorf, IA
Member No.: 79628
OS: Vista Home Premium x64
Country Flag


Try it with double backslahes \\ instead of singles
Go to the top of the page
 
+Quote Post
Iskander Novena
post Jul 23 2008, 12:13 AM
Post #5


Newbie


Group: Members
Posts: 10
Joined: 18-July 08
Member No.: 201398
OS: Vista Ultimate x64
Country Flag


in the config.js the single slashes are double slashes, so that's not the problem (sorry, I use the wpi.hta to define my config, hence the single slashes...)

So that's not the issue.
Go to the top of the page
 
+Quote Post
mritter
post Jul 23 2008, 08:54 AM
Post #6


WPI Co-Developer
Group Icon

Group: Software Developers
Posts: 654
Joined: 13-November 05
From: Bettendorf, IA
Member No.: 79628
OS: Vista Home Premium x64
Country Flag


I did some tests last night, they worked. I will say the obvious: you have Organization spelled with a Z in one place and an S in the other.
Go to the top of the page
 
+Quote Post
Iskander Novena
post Jul 23 2008, 09:54 AM
Post #7


Newbie


Group: Members
Posts: 10
Joined: 18-July 08
Member No.: 201398
OS: Vista Ultimate x64
Country Flag


QUOTE (mritter @ Jul 23 2008, 04:54 PM) *
I did some tests last night, they worked. I will say the obvious: you have Organization spelled with a Z in one place and an S in the other.


Only in this forum, not in the config.js...

Does the fact that I'm using Vista x64 Ultimate make a difference?
Go to the top of the page
 
+Quote Post
mritter
post Jul 23 2008, 01:44 PM
Post #8


WPI Co-Developer
Group Icon

Group: Software Developers
Posts: 654
Joined: 13-November 05
From: Bettendorf, IA
Member No.: 79628
OS: Vista Home Premium x64
Country Flag


Make sure you are thinking the same way as WPI:

Cond: If RegKeyValue(....)=="your value" it will be hidden - the condition is met
If RegKeyValue(....) != "your value" it will be shown - the condition is not met

GCond: If RegKeyValue(....)=="your value" it will be normal
GCond: If RegKeyValue(....) != "your value" it will greyed.

Cond is meant for strict exclusions to hide items. GCond is more relaxed....it will work just not recommended, but you can use if you want....

Do use double backslahes \\ in the key.


I never liked the names, but always been that way. I would call Cond "Exclude" and GCond "Include". Include still isn't ideal, but better. "Exclude If Met" and "Include If Met".
Go to the top of the page
 
+Quote Post
Iskander Novena
post Jul 23 2008, 03:11 PM
Post #9


Newbie


Group: Members
Posts: 10
Joined: 18-July 08
Member No.: 201398
OS: Vista Ultimate x64
Country Flag


Thanks, but so far it doesn't trigger either way... I'm not home the next couple of weeks, so I'll check when I get back...
I'll report back here, then...
Go to the top of the page
 
+Quote Post
Dragonsys
post Aug 21 2008, 08:09 AM
Post #10





Group: Members
Posts: 1
Joined: 6-March 08
Member No.: 180618
OS: 2003 x86
Country Flag


QUOTE (Iskander Novena @ Jul 21 2008, 09:52 AM) *
I've got a problem with the RegKeyValue-option in either Condition or Greyedout Condition.
I use the following:
CODE
RegKeyValue("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\RegisteredOrganization")=="Organisation"

Where, in my registry, my registered organisation is the value that is checked against.

However, either when in Condition or Greyedout Condition, this does not trigger!
Also tried with the full root (HKEY_LOCAL_MACHINE) but that does not make any difference...


try using
RegKeyValue("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\RegisteredOrganization")=="Organisation"

here is one that I use (copied from my config.js):
cond[pn]=['RegKeyValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\McKesson\\WIE\\Build Variables\\Windows Variables\\Windows Edition")=="_SP1E32"'];
Go to the top of the page
 
+Quote Post
Iskander Novena
post Aug 21 2008, 08:12 AM
Post #11


Newbie


Group: Members
Posts: 10
Joined: 18-July 08
Member No.: 201398
OS: Vista Ultimate x64
Country Flag


Hi Dragonsys,

Unfortunately, that is not the issue. The 'code' I gave is the code I type in GUI.
I know that in config.js the backslashes are double..

Thanks for replying, though...
Go to the top of the page
 
+Quote Post

Google Frontpage Forums Unattended CD/DVD Guide

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 8th January 2009 - 01:39 AM
All trademarks mentioned on this page are the property of their respective owners
MSFN is not affiliated with Microsoft
Copyright © 2001-2008 msfn.org
Privacy Policy