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.

gcond[]

Featured Replies

I had been working with Lawrenca on this for a few days before I figured it out. When doing a gcond[] or cond[] check for registry settings he would get the error message "....Treating as false condition....", however it goes. This method works:

gcond[pn]=['try{WshShell.regRead("HKLM\\SOFTWARE\\7-Zip\\Path") != "" ? true : false}catch(ex){;}'];

The try{} and catch{} eliminate the error message. Modify for your needs.

I had been working with Lawrenca on this for a few days before I figured it out. When doing a gcond[] or cond[] check for registry settings he would get the error message "....Treating as false condition....", however it goes. This method works:

gcond[pn]=['try{WshShell.regRead("HKLM\\SOFTWARE\\7-Zip\\Path") != "" ? true : false}catch(ex){;}'];

The try{} and catch{} eliminate the error message. Modify for your needs.

so , if i want to check

at

$Regpath = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows Media Player 10\KB911565"

if exist the key

$KeyToCheck = "DisplayVersion"

and if exist the $KeyToCheck, at $Regpath with a value

$KeyValueExpected = "2"

and only then my gcond must be true (i use this in an autoIT script)

you say I can use without error something like

gcond[pn]=['try{WshShell.regRead($Regpath\\$KeyToCheck) == $KeyValueExpected ? true : false}catch(ex){;}'];

or translated

gcond[pn]=['try{WshShell.regRead("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Updates\\Windows Media Player 10\\KB911565\\DisplayVersion") == "2" ? true : false}catch(ex){;}'];

  • Author

That's what Lawrenca is doing with it. I myself never use it. I do clean installs only so I don't need to check for any existance of installed programs.

He is doing updates to existing client computers and has already installed programs grayed out. Actually, I think he modded his code to not show the line at all. You may want to contact him for more ways he is using it.

As for no errors, I mean no errors from WPI. The eval() call would throw up this error message:

Error in condition statement for -program-: Treating as a false condition.

You can put your own error message inside the catch(ex){;} brackets if you want. As is, nothing is reported. Which is better for a UA install. If you want, put this in there:

alert("RegKey does not exists.");

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.