Solved

Determine GUID of application

Posted on 2006-10-24
1
1,070 Views
Last Modified: 2008-03-03
I have some code to uninstall a product by using the registry-stored uninstall string.
However, I seem to be having some trouble locating the application from my script.

I can certainly submit a Find routine within the registry to search for the Product Name, but I want to be able to do this in my vbs script.

Has anyone else had this difficulty?
0
Comment
Question by:shawngilbert
1 Comment
 
LVL 67

Accepted Solution

by:
sirbounty earned 250 total points
ID: 17800460
I have a batch file that I use for a similar purpose.  The product I'm looking for here is Symantec Antivirus - your situation may differ, so it may require an adjustment or two...


@echo off
cls
for /f %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall') do call :regquery %%a
goto :eof

:regquery
set key=%1
if [%key:~-1,1%]==[}] (
  for /f "tokens=3* delims= " %%d in ('reg query %key% /v DisplayName ^|find /i "Symantec AntiVirus"') do (
    if [%%d]==[Symantec] if [%%e]==[AntiVirus] for /f "tokens=3* delims= " %%x in ('reg query %key% /v UninstallString') do set strUnInst=%%x %%y
    start /wait %strUnInst%
    pause
    exit
  )
)
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

This is about my first experience with programming Arduino.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now