Novell is now a part of Micro Focus

OR vs. AND in Environment Variables

Novell Cool Solutions: Tip

Digg This - Slashdot This

Posted: 22 Nov 2000

Current version: ZENworks for Desktops 3

Recently we published a Q&A as follows:

C G. wrote: Is there a way to set an Application Object to run if an Environment Variable = A OR B?
I've created two Application Objects with different flavors of an application (ie. multimedia and standard). I have ten different machine types, each of which can be identified by a unique environment variable (ie. D1, D2, D3, etc). Five of the PCs require the multimedia version of the app and the other five, the standard version. I figured I could use System Requirements to tell the object to run if it has certain environment variables. That is, set the multimedia app to run if the environment variable = D1, set a second environment variable in the multimedia app to run if = D2. Then with the standard app, set the app to run if the environment variable = D3 or D4. Unfortunately, this does not work because the object never equals both D1 and D2. Can you set an OR rather than AND for environment variables or maybe use a comma in Value Data?

Using ZEN 2.0, you can setup system requirements based on environment variables. Unfortunately, you can only AND the comparisons. Therefore, you could check for the absence of other variables.

Here are some other ideas.

Julian Doyle

I have another answer. What I have done for this (it may not be pretty be it works) is to use this variable in the login script to map a drive with a unique letter to anywhere on the network (ie. Q).

Then in the application object under System Requirements, tick "display applications on machines that have at least" then use the "free disk space in "Q" = xxx MB."

This works.

Julian Greenwood

Your answer is quite true, but you can work around this problem.

The way is to create duplicate AO's with a different system requirement. This way you will cover all of the options. Not pretty but it does work. I am sure there are other more elegant ways of doing this.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates