Action failing Uninstall string

(imported topic written by SystemAdmin)

all im trying to do is check if the registry key {F060A75A-9D6E-46F5-AAAA-7B513F4F44FB} is present then delete it

the action fails instantly after running nothing, the lines below are half way through the action script and the line that fails is the if{… line

Failed

if {exists value “UninstallString” of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{{F060A75A-9D6E-46F5-AAAA-7B513F4F44FB}” of registry}

wait REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{{F060A75A-9D6E-46F5-AAAA-7B513F4F44FB} /f

endif

I have tried it several different ways… escaping/not escaping… neither seem to work

(imported comment written by cstoneba)

try this

if {exists value “UninstallString” of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{F060A75A-9D6E-46F5-AAAA-7B513F4F44FB}}” of native registry}

wait REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{F060A75A-9D6E-46F5-AAAA-7B513F4F44FB} /f

endif

I’m not sure if there needs to be a second } before the /f

(imported comment written by SystemAdmin)

cstoneba

try this

if {exists value “UninstallString” of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{F060A75A-9D6E-46F5-AAAA-7B513F4F44FB}}” of native registry}
wait REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{F060A75A-9D6E-46F5-AAAA-7B513F4F44FB} /f
endif

I’m not sure if there needs to be a second } before the /f

Still fails on the IF{… LINE ??

Failed if {exists value “UninstallString” of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{F060A75A-9D6E-46F5-AAAA-7B513F4F44FB}}” of native registry}

(imported comment written by tig91)

You have to use double “{{” at the start of the GUID (single “}” at the end).

if {exists value "UninstallString" of key "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{F060A75A-9D6E-46F5-AAAA-7B513F4F44FB}}" of native registry}  
wait REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{F060A75A-9D6E-46F5-AAAA-7B513F4F44FB} /f
endif

(imported comment written by SystemAdmin)

this is exactly how I have it now and it still fails, also nothing runs at all, it just fails on the “if” line below and quits

if {exists key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{{F060A75A-9D6E-46F5-A9E6-7B513F4F44FB}” of native registry}

wait REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{{F060A75A-9D6E-46F5-A9E6-7B513F4F44FB} /f

endif

This is part of how i’m uninstalling Patchlink, since the uninstall cant be run silently I have to rip it out manually

this is the whole thing,

wait sc config 
"Patchlink Update" start= demand wait instsrv 
"Patchlink Update" REMOVE   

if 
{exists key 
"HKLM\SOFTWARE\PatchLink" of registry
} wait REG DELETE HKLM\SOFTWARE\PatchLink /f endif 

if 
{exists key 
"HKLM\SOFTWARE\PatchLink.com" of registry
} wait REG DELETE HKLM\SOFTWARE\PatchLink.com /f endif 

if 
{exists key 
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{F060A75A-9D6E-46F5-A9E6-7B513F4F44FB}" of 

native registry
} wait REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
{
{F060A75A-9D6E-46F5-A9E6-7B513F4F44FB
} /f endif 

if 
{exists value 
"PDDM" of key 
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" of registry
} REGDELETE 
"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]" 
"PDDM" endif wait 
{(pathname of client folder of site 
"BESSupport" & 
"\taskkill.exe /f ") & (

if (name of operating system = 
"WinXP" OR name of operating system = 
"Win2003") then 
" /im PDDM.EXE" 

else 
"PDDM.EXE")
} DOS rmdir /S /Q 
{name of drive of windows folder
}\Program Files\PatchLink

(imported comment written by tig91)

Whoops. Sorry, I must have been looking at a reply. I’m not quite sure then, maybe “dos reg delete”? Have you tried using an appendfile, ala:

http://forum.bigfix.com/viewtopic.php?pid=5462

(imported comment written by DennisA91)

In order to get the {} that enclose the Relevance to operate correctly, you might want to try replacing the {} that are part of the GUID with %7B and %7D. The statement would look like this:

if {exists key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall%7BF060A75A-9D6E-46F5-A9E6-7B513F4F44FB%7D” of native registry}

(imported comment written by SystemAdmin)

Thank You, I will give that a try next time…

I rewrote it to write a .reg file and it worked fine

and of cource before this I check and depoy if nessessary “SC.EXE” on windows 2000 and “instsrv”

Here is the Finished Task to uninstall (rip out) Patchlink

if 
{exists service 
"Patchlink Update"
} wait sc config 
"Patchlink Update" start= demand wait instsrv 
"Patchlink Update" REMOVE endif   delete __createfile delete CleanPatchlink.reg createfile until __EOF Windows Registry Editor Version 5.00   [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
{
{F060A75A-9D6E-46F5-A9E6-7B513F4F44FB
}] [-HKEY_LOCAL_MACHINE\SOFTWARE\PatchLink.com] [-HKEY_LOCAL_MACHINE\SOFTWARE\PatchLink] __EOF move __createfile CleanPatchlink.reg waithidden regedit /s CleanPatchlink.reg   

if 
{exists value 
"PDDM" of key 
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" of registry
} REGDELETE 
"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]" 
"PDDM" endif   wait 
{(pathname of client folder of site 
"BESSupport" & 
"\taskkill.exe /f ") & (

if (name of operating system = 
"WinXP" OR name of operating system = 
"Win2003") then 
" /im pddm.exe" 

else 
"pddm.exe")
} dos cmd /c rd /q /s 
"{name of drive of windows folder}\Program Files\PatchLink"

(imported comment written by sureshhan91)

This the Patchlink registry key I am unable to unistall Silent

MsiExec.exe /X {176E8FD2-5BE4-47f5-A7FB-379428C0C027}

(imported comment written by SystemAdmin)

I was never able to silently uninstall Patchlink, I had to rip it out with this method

if 
{exists service 
"Patchlink Update"
} wait sc config 
"Patchlink Update" start= demand wait instsrv 
"Patchlink Update" REMOVE endif   delete __createfile delete CleanPatchlink.reg createfile until __EOF Windows Registry Editor Version 5.00   [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
{
{F060A75A-9D6E-46F5-A9E6-7B513F4F44FB
}] [-HKEY_LOCAL_MACHINE\SOFTWARE\PatchLink.com] [-HKEY_LOCAL_MACHINE\SOFTWARE\PatchLink] __EOF move __createfile CleanPatchlink.reg waithidden regedit /s CleanPatchlink.reg   

if 
{exists value 
"PDDM" of key 
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" of registry
} REGDELETE 
"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]" 
"PDDM" endif   wait 
{(pathname of client folder of site 
"BESSupport" & 
"\taskkill.exe /f ") & (

if (name of operating system = 
"WinXP" OR name of operating system = 
"Win2003") then 
" /im pddm.exe" 

else 
"pddm.exe")
} dos cmd /c rd /q /s 
"{name of drive of windows folder}\Program Files\PatchLink"

please try msiexec.exe /x {{176E8FD2-5BE4-47f5-A7FB-379428C0C027}