Jump to content

Problem with RegKeyValue


Recommended Posts

I've got a problem with the RegKeyValue-option in either Condition or Greyedout Condition.

I use the following:

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...

Link to comment
Share on other sites


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

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

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

Edited by mritter
Link to comment
Share on other sites

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....

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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".

Link to comment
Share on other sites

  • 4 weeks later...
I've got a problem with the RegKeyValue-option in either Condition or Greyedout Condition.

I use the following:

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&quot];

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...