Solved

Run a script to find a registry entry on remote computers?

Posted on 2008-10-20
8
729 Views
Last Modified: 2012-05-05
Greetings Experts!

I have a 200+ Windows XP/2003 AD domain in which I recently used a group policy to install Adobe Active-x player on the users pc's.  After running an inventory update on SpiceWorks, only 53 of the 200 show up as having the software installed.  Yet I have verified at least 5 others that have the software installed and are not showing up in SW.

So, I want to run a script that will find the app code {AC76BA86-7AD7-1033-7B44-A9000000000} in the registry of the computers listed in a text file.  The problem is, I have no idea how to make this happen.  My scripting skills are novice at best so if you post a suggestion, please provide it with some help or be willing to answer some newb questions.

Thanks in advance!
0
Comment
Question by:samiam41
  • 5
  • 2
8 Comments
 
LVL 8

Expert Comment

by:DenverRick
ID: 22759102
You would probably have to buy one of the many utilities available for registry work...or you could create a script in Group Policy that runs at logon, that uses the reg command to query the local registry and port the results to a file (on a server) named with the local machine name.
0
 
LVL 38

Accepted Solution

by:
Shift-3 earned 500 total points
ID: 22759414
Paste the script below into a text file with a .cmd extension.  Customize the value of the key variable with the location of the registry key to check for.  Running the script will check for the existence of the key on all computers in computerlist.txt and output the results to log.csv.


@echo off
setlocal
 
set key=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1033-7B44-A9000000000}
set log=log.csv
 
for /F %%G in (computerlist.txt) do (
 reg query "\\%%G\%key%" > NUL 2>&1
 if errorlevel 1 (echo %%G,no>>"%log%") else (echo %%G,yes>>"%log%")
)

Open in new window

0
 
LVL 9

Author Comment

by:samiam41
ID: 22759574
Thanks for the posts.

@ Shift-3 >  That is what I was looking for.  I will test it out now and let you know the results.
0
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 
LVL 9

Author Comment

by:samiam41
ID: 22759946
How do I specify where the computerlist.txt file is located or where does the script believe it should be located?
0
 
LVL 9

Author Comment

by:samiam41
ID: 22759972
never mind.  I figured it out.  Thanks
0
 
LVL 9

Author Comment

by:samiam41
ID: 22759991
DUDE!!  That is seriously one of the COOLEST scripts I have seen.  Maybe I am just easily amazed but man that makes it easy to use and understand the results.  YES!  

Can I modify that to detect other apps as long as I change the app code??
0
 
LVL 38

Expert Comment

by:Shift-3
ID: 22760230
Yes, just change the value of the key variable.
0
 
LVL 9

Author Closing Comment

by:samiam41
ID: 31507867
I know that must have been painfully easy for you but your answer proved invaluable for me.  Thanks again for your help.

Regards,
Aaron
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Navigation is an important part of web design from a usability perspective. But it is often a pain when it comes to a developer’s perspective. By navigation, it often means menuing. This is less theory and more practical of how to get a specific gro…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question