Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Using Command Line for Reg Query

  • Please log in to reply
1 reply to this topic

#1 panthersfan25


  • Members
  • 38 posts
  • Gender:Male
  • Location:Ohio
  • Local time:09:27 PM

Posted 26 June 2014 - 09:30 AM

Good Morning All,


I have been looking for a tutorial on creating a batch file to uninstall a program and remove any registry keys associated with it.


For example, we want to uninstall Symantec Endpoint Protection v. 12.  I used their suggested approach which is to run msiexec.exe /q/x <product code> from the command line after manually finding the product code in the regedit.  I want to know how to query the registry for the product code (which is under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall), because we have it on 150 workstations and I have only looked at about 25 machines and there are 6 different product uninstall codes so far.


I want to query the product code, then run the cmd msiexec.exe /q/x <product code> to uninstall the product.


Can anyone help with this scenario or point me to a good tutorial of how to use reg query?




BC AdBot (Login to Remove)


#2 Kilroy


  • BC Advisor
  • 3,408 posts
  • Gender:Male
  • Location:Launderdale, MN
  • Local time:08:27 PM

Posted 26 June 2014 - 10:21 AM



Where MACHINENAME is the name of the remote machine.


Run REG /QUERY /? for more help and examples.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users