Hi everyone,

 

I've run into a bit of a problem, something happens with installations of Adobe Flash on the workstations in my environment, and it's causing them to give an error when you try to uninstall it.  We are pushing Adobe Flash out via the .msi's with group policy(software installation policy), and the problem comes in when technicians are constantly having to visit workstations to search for a particular registry key, delete it manually, and then Adobe Flash will install on the next reboot.  Let me explain a bit more,

 

To fix this error on an affected workstation you have to search under "HKEY_CLASSES_ROOT\Installer\Products", and under one of the subkeys here, such as "30AC997E64E77EA47A6B9E40CCDF5192", you will find one with a REG_SZ value of "ProductName", it's data is "Adobe Flash Player 11 ActiveX".  The problem is we have to search each one of these lengthly subkeys for the one that belongs to the Adobe Flash installation.  Once we find it and remove the entire "30AC997E64E77EA47A6B9E40CCDF5192" that has the REG_SZ value of "ProductName" data "Adobe Flash Player 11 ActiveX", we can reboot the workstations, and things work great. 

 

The problem I'm really having is on every workstation the "30AC997E64E77EA47A6B9E40CCDF5192" used here is only an example, this string is random from machine-to-machine, it's generated during the Adobe Flash installation.  This is where I'm stuck having to make the script search and evaluate everything under HKEY_CURRENT_USER\Installer\Products.

 

What can I do fellas, is it even possible?

 

Here's a screenshot for a little more clarity:

http://i.imgur.com/aAqYl.jpg

Answer Summary:
Thanks for the input everyone, here is the working code for future reference! @echo off set product=Adobe Flash Player 11 ActiveX for /F "delims=" %%a in ('reg query HKEY_CLASSES_ROOT\Installer\Products') do call :Sub %%a goto :eof :Sub set key= reg query "%*" | find /i "%product%" && set key=%* if "%key%"=="" goto :eof reg query "%*" | find /i "%product%" echo Y|reg delete "%key%"
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

3

Thanks for the input everyone, here is the working code for future reference!

@echo off
set product=Adobe Flash Player 11 ActiveX
for /F "delims=" %%a in ('reg query HKEY_CLASSES_ROOT\Installer\Products') do call :Sub %%a
goto :eof

:Sub
set key=
reg query "%*" | find /i "%product%" && set key=%*
if "%key%"=="" goto :eof

reg query "%*" | find /i "%product%"
echo Y|reg delete "%key%"

Answered 08/20/2012 by: LogicBomb
Senior Yellow Belt

Please log in to comment

Answers

2
Answered 08/20/2012 by: andemats
Second Degree Black Belt

Please log in to comment
1
Answered 08/20/2012 by: piyushnasa
Red Belt

  • Ah that would ofc work too.

    Note to self: *Need to think outside of the box* ;-)
  • Thanks, I tried this, even if fails during removal... appreciate your assistance.
Please log in to comment
1

Here's what I have so far, it's a batch file and someone from microsoft technet helped put it together.  It does the job great, but it doesn't remove the key, only reports it via output.txt. 

 

Can anyone help with where I might put the "reg delete" syntax in all of this?

 

 

@echo off
set product=Adobe Flash Player 11 ActiveX

if exist output.txt del output.txt
for /F %%a in ('reg query HKEY_CLASSES_ROOT\Installer\Products') do call :Sub %%a
notepad output.txt
goto :eof

:Sub
reg query %1 | find /i "%product%" >> output.txt && echo %* >> output.txt

Answered 08/20/2012 by: LogicBomb
Senior Yellow Belt

  • looks like you have an answer from another site
    http://social.technet.microsoft.com/Forums/en/ITCG/thread/e8d652a4-1047-4065-9f8e-45c5943e4a80
Please log in to comment
1
Answered 08/20/2012 by: SMal.tmcc
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity