Scripting Question

Needing a WMI Query for searching an Installed Application on a workstation. Please help.

05/31/2015 3540 views
Has anyone used ManagePC (http://managepc.net/)? I ran into it the other day and it seems pretty neat for being free. There is even a WMI Query Builder. I wanted to check if anyone has a query that I can modify where it will let me find a particular application is installed on a machine.

Per example running a query that will provide me a list of computer that has 'C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe'

0 Comments   [ + ] Show comments


All Answers

If you want to query just for the EXE, then a simple file search script will do. I'd avoid hard-coded paths like 'C:\Program Files(x86)...' Instead, use the environment variable which points at the 32-bit and 64-bit locations for those targets.

If you want to search for specific software, use either the WindowsInstaller.Installer object's ProductState property or, in WMI, use the Win32_Product class's InstallState property. You can find script samples using both of these routes everywhere. All you need do is extract the query part.
Answered 06/01/2015 by: VBScab
Red Belt

  • Win32_Product is slow and buggy, better use registry uninstall list.
Such bugs as there are are pretty obscure. I can't imagine that the OP would encounter any issues in a simple 'is this product installed' query. 
Answered 06/01/2015 by: VBScab
Red Belt

you can find the needed info with wmic product where "name like 'java%%'" list (if you search for all installed java versions, for special versions you can modify this) If you replace the list paramater with call uninstall, you are did off this software
Answered 06/01/2015 by: Nico_K
Red Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ