?
Solved

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

Posted on 2008-10-20
8
Medium Priority
?
736 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
[X]
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
  • 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 2000 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
Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

762 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