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.

Newbie gcond question

Featured Replies

I'm a newbie and I've got a little question (probably silly):

-I put this into gcond : FileExists('%programfiles%\something')

-The directory "%programfiles%\something" doesn't exist

-I selected "if grayed condition is true..."

-When I launch WPI, I CAN select the item with this gcond

What I've done wrong ??


First, cond/gcond will only work when looking for files not dirs.

Second, your looking at everything in reverse.

Try this:

!FileExist('%programfiles%\Somewhere\Something.exe')

! basicly means not or doesn't (a negative statement).

So the above code would read (in english)

If Something.exe does not exist in %programfiles%\Somewhere then set cond/gcond as true.

Hope this helps ;) .

  • Author

Thanks for your answer. I will try this tomorrow.

:thumbup

No problem, when I first started configuring WPI it took me a whole weekend to get gcond/cond to work properly.

Just wait until you want to set two or three different conditions in the same command, that really messes with your head :wacko: .

Happy scripting.

  • 2 weeks later...

Its not exactly true that WPI - gcond only looks for files and not folders. this is what i tested :

gcond[pn]=['!FileExists(\'"%PROGRAMFILES%\VMware"\')'];

and

gcond[pn]=['!FileExists(\'"%PROGRAMFILES%\VMware\VMware Tools\VMwaretray.exe"\')'];

ether of those two lines will gray out my "program" even if the folder "VMware Tools" and thereby the file VMwaretray.exe is NOT present.

I ran WPI on a computer with only VMware Workstation installed, that means that the folder %ProgramFiles%\VMware is present (not the tools folder) - and it still gets grayed out.

i even disovered that on some programs it is needed to have the dubble backslashes Like :

gcond[pn]=['!FileExists(\'"%PROGRAMFILES%\\Notepad++\\notepad++.exe"\')'];

i havent found out why, yet, but will test further.

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.