Hi all!
I need a bit of assistance in creating a global condition to see if a file exists or not on a computer before a deployment. I know there is a way to do this built into creating a Global Condition already but it lacks the ability to deploy based on each specific
instance (I can only put a single file to each Global Condition). I am looking for a way to query the computer to see if a file exists as a requirement for each deployment and then deploy based on the Deployment Method which it meets.
This is what I have so far:
Device Type: Windows
Condition Type: Setting
Setting Type: WQL Query
Data Type: String
Namespace: root\cimv2
Class: CIM_DataFile
Property: Name
Where Clause: <Blank>
I want to be able to call the condition and type in something along the lines of 'C:\Folder\App.txt' so I can not have a ton of global conditions where I could just have a single one that looks for different parameters. I am very new to WQL Query and how it works but I've managed to make similar work with computer names, and when I search with scriptomatic I can see the value of the file in the query. The deployment fails each time still. I'm not sure if it's because of the difference between WMI and WQL or something else. Any help is appreciated!