Post by tjm308 on Oct 11, 2019 23:45:30 GMT
Good day admins,
I'm hoping to use UI++ as a frontend to an upcoming in-pace upgrade task sequence. I need to query running processes as part of Preflight to ensure that users don't have any Office apps open. I can't seem to get this working no matter how I format it. Let me preface this by saying that the applications I'm testing for are running during testing from the command prompt. I also understand that I'll eventually need to add Default="False" to act upon when the apps aren't running.
Queries always fail, but there's no error in the log - it just moves on to the next entry. Pasting the query into WBEMtest produces the expected result.
<Action Type="WMIRead" Variable="Word" Query="SELECT Handle FROM Win32_Process WHERE Name LIKE '%winword%'"/>
If I use the non-query format, it also fails but with the below error logged. (I've tested every combination of Name LIKE vs. Name = but it doesn't seem to make a difference.)
<Action Type="WMIRead" Variable="Outlook" Namespace="root\cimv2" Class="Win32_Process" KeyQualifier='Name="OUTLOOK.EXE"' Property="Handle"/>
Found <WMIRead> Action:
Initiating <WMIRead> Action:
- Could not retrieve value for WMI property Handle in class CIM_Process: Invalid object path
I've tested on both 2.11.1.1 and 2.11.1.2 with the same result. Other WMI queries work just fine. I've searched extensively for the solution but have come up empty-handed.
I guess I could write a script to run the query, save the results, then have UI++ read it back, but it seems like this functionality is already there and I just can't seem to make it work.
Can anyone offer any suggestions?