Thanks George
George Steiger schrieb:
> A policy should be applied only when a specific file does *NOT* exists. Is
> there someone that knows how to write a WMI filter for this specific problem.
NOT constructs are always tricky in WMI - at least for what I've seen. I
guess you already have found a way to check for a file, I'd go about it
like this:
Select * From Win32_Directory Where Name = 'C:\\Folder\\myFile.txt'
I'd try to do something lile <> instead of = to try to say "not equal" -
but I guess that will return true if there's some other file (beside the
myFile.txt) in the directory. You'd definitely have to try that out.
Another way of doing this kind of GPO filtering can be done with GP
Preferences. Have you already checked them out? They have a feature
called "Item-level targetting" which lets you choose filter criteria for
which the policy shall apply. Among a lot of filters, there's a
file/folder filter (you can even check for the file version!).
See: http://www.frickelsoft.net/blog/?p=127
cheers,
Florian
The <> can not work. It simply returns all other files. This means the WMI
Filter is evaluated to true. But this is not what im looking for. I need the
WMI Filter is evaluated to true if the specified file is *not* found.
Preferences are not an option.
George