November 14, 200619 yr 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 gcondWhat I've done wrong ??
November 15, 200619 yr 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 .
November 16, 200619 yr 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 .Happy scripting.
November 26, 200619 yr 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