RegKey Delete Action command

Hi All,

I am trying to delete the below reg key but it is not completed. it is saying “the expression contained which is not allowed”

if {exists key “HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield_{{B5BACF37-1A3C-4923-ADD7-5AEDA14740ED}\test” of registry }
regkeydelete "[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield_{B5BACF37-1A3C-4923-ADD7-5AEDA14740ED}\test]"
endif

Thanks,
Nagaraj.

You have to escape the { commands which you did on one part but not the second

2 Likes

Thanks @AlanM it is worked.

but for other key it is worked like below

Working key:

if {exists key “HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\test” of registry }
regkeydelete "[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\test]"
endif

but not working below key

if {exists key “HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield_{B5BACF37-1A3C-4923-ADD7-5AEDA14740ED}\test” of registry }
regkeydelete "[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield_{B5BACF37-1A3C-4923-ADD7-5AEDA14740ED}\test]"
endif

See Tip: Escaping curly brackets for substitutions in ActionScript

2 Likes