Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2008-10-20
8
728 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

792 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