[wpkg-users] check type "logical"

Pendl Stefan stefan.pendl at haidlmair.at
Sat Nov 7 09:18:02 CET 2009


>
> I'm testing a check type="execute" to install software if the computer is member of an MS AD group.
>
> This check works well alone::
>          <check type="execute" path='\\sc18\Sources\WPKG\Packages\tools\groupmember.cmd "G WPKG tstpkg"' condition="exitcodeequalto" value="0" />
> It installs the package if the computer is member of the AD Group "G WPKG tstpkg"
>
> However it will Allways install the package as the condition will allways be true.
> So I need to add a second condition so it will check if the package is not already installed. This is where I bug::
>
> <check type="logical" condition="and">
>          <check type="execute" path='\\sc18\Sources\WPKG\Packages\tools\groupmember.cmd "G WPKG tstpkg"' condition="exitcodeequalto" value="0" />
>          <check type="file" condition="exists" path="c:\tstpkg\tstpkg.dat" />
> </check>
>

AND is the default condition for checks, there is no need to explicitly specify it.

<check type="execute" path='\\sc18\Sources\WPKG\Packages\tools\groupmember.cmd "G WPKG tstpkg"' condition="exitcodeequalto" value="0" />
<check type="file" condition="exists" path="c:\tstpkg\tstpkg.dat" />

The above should be sufficient.

---
Stefan



More information about the wpkg-users mailing list