Solved

Determine GUID of application

Posted on 2006-10-24
1
1,093 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupNoAdj 7 95
move one pixel 4 67
Windows Batch File - Display current time and date in FOR command 8 76
Rubik's Cube Code for Effective Presentation 3 52
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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…

815 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

8 Experts available now in Live!

Get 1:1 Help Now