Setting LockState dynamically

(imported topic written by akummer)

We have the following requirement:

We have some computers which are assigned to special admins who are not allowed ot use the BES console (it will not make sense, because these people have only a handfull of computers to care about). But nevertheless they shall be able to determine WHEN patches should be installed (i.e. a laboratory measurement has been finished and there is a time gap until the beginning of the next).

To do that we think about using a dynamic setting for letting the administrator lock and unlock computers by changing local properties of the target system.

For that I used the following action script:

setting “__LockState”="{if (exists file “C:\locked.txt”) then “true” else “false”}" on “{now}” for client

It just checkes the existance of the file C:\locked.txt and switches to “Locked” if present.

The problem arises that switching back to unlocked seems not be possible with this method - because the computer is locked and the action will not be applied…

Any ideas how to solve the requirement? Otherwise we will stop the BES client service and let the administrator start it - but then we will loose online reporting!

Regards

Andreas

(imported comment written by jessewk)

Andreas,

Settings actions ignore the LockState, so if you apply your dynamic setting through the ‘Edit computer settings’ dialog you’ll be able to get the dynamic setting to apply regardless of the current value of LockState.

I wrote up some instructions in this post here: http://forum.bigfix.com/viewtopic.php?id=100

Also, as a note, if you ever find yourself writing an expression, {if (exists something) then “true” else “false”}, you can always drop the if statement all together. Instead, just write {exists something}.

-Jesse

(imported comment written by akummer)

Hi Jesse,

great, this works!

Thanks again!

Andreas