Scripting Question

Can I use PSTools to check for installed software using the reg keys?

08/05/2015 2577 views
I have installed Shockwave and Flash via GPO and am wondering if I can use PSTools to check the registry for the uninstall key to see how many installs have been done so far. I would like to do it by AD OU's if possible.
Answer Summary:
0 Comments   [ + ] Show comments


Answer Chosen by the Author

If you don't have an inventory system then use can use MAP ToolKit for this purpose (for any application, hardware, windows os etc.)

Samples are here

Note: Consider the network bandwidth before you start scanning the machines
Answered 08/08/2015 by: jagadeish
Red Belt

All Answers

VBScript/WMI would be a better option as it can handle retrieval of OU information as well as registry information.  I'm assuming you did all the installs manually and forgot to count, as I'm not aware of any deployment systems that don't keep a record of where software has been installed.
Answered 08/05/2015 by: EdT
Red Belt

  • I created the MSI and MST and it was installed via GPO and startup script. I didn't install it manually or count the installs, this is what I want to find out, how many have been installed by searching the Registry for the uninstall key.
Sorry, I missed the reference to GPO in your original posting.  However, I cannot think of any pstool which meets your needs, so I come back to my original suggestion of using VBScript / WMI to grab the necessary information.
Answered 08/06/2015 by: EdT
Red Belt

  • OK, do you have an example of how I can do it, I'm new to this and haven't done a lot of scripting, just a bit.
Can I introduce you to a search engine called Google.com?
I entered the following into the search field: "Get OU with vbscript"
Here are a couple of hits that may help. The first is from Microsoft's script centre:
The following is a more generic script that can be used to find the OU associated with a computer name:

Presumably you have a list, eg a text file, containing all your computernames, or can get this from AD.

Grab a copy of the script56.chm help file which is part of the wscript download. It may be a later version than 5.6 today. This has a lot of code examples for both vbscript and jscript.

This should get you up and running.
For what it's worth, I doubt anyone writes entire scripted solutions from scratch. Everyone I know searches the internet for code examples that do most of what is needed and then fine tune them for our specific requirement.

Answered 08/06/2015 by: EdT
Red Belt

  • Yes I am aware of google, just so many results to determine the best one. I think I can use this:

    IF EXISTS PCs.txt del PCs.txt
    for /f "Tokens=2 Delims==," %%i in ('dsquery computer -Limit 4000 "OU=XXX,OU=XXX,DC=XXX,"') do ECHO %%i >> SLT_MOD-PCs.txt
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