Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Problem with RegKeyValue

Featured Replies

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

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

  • Author

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

  • Author

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.

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.

  • Author
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?

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

  • Author

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

  • 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];

  • Author

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

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.