Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Determine GUID of application

Posted on 2006-10-24
1
Medium Priority
?
1,122 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 1000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Starting up a Project

719 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