I have been searching the web and i came up with NO results while it seems so convenient to have!
Background information: With basic netlogon batchfiles i used a write a checkfile in a temp folder to check if this script has already ran so it wouldn't take up too much time. But these days we do everything in policy.
A while back i've made a small vbs that adds an outlook signature with user information from AD. Currently users run this script manually because it can only be run successfully after the outlook profile was created. I can ofcourse run my VBS script with EVERY logon and check if the signature file already exists and quit if it does... but there has to be a better way! ..i hope..
This is what i would like to do: Use GPO WMI Filtering to check if a file exists (i.e. Select * From CIM_Datafile Where Name <> '%APPDATA%\outlook.v1'). If true: launch my vbs. Inside my script i will check if the outlook profile exists and run the rest of the script and create the outlook.v1 file at the end of my script.
This way only the very limited amount of users that do not have outlook will be running this vba every time.
The syntax
Select * From CIM_Datafile Where Name <> '%APPDATA%\\outlook.v1'
or
Select * From CIM_Datafile Where Name <> 'c:\users\%use_the_username_of_the_one_currently_loggin in%\\outlook.v1'
Is ofcourse wrong.. so the real question is: How do i refer to a user based setting in WMI filtering..?