Solved

Determine GUID of application

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

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.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
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 …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

623 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