Solved

Determine GUID of application

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
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 …
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 …

867 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

21 Experts available now in Live!

Get 1:1 Help Now