Trying to run the following action script
action uses wow64 redirection false
// Check if the registry key exists
if {exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{D6932D97-36F1-40B8-9CDC-CA8365B21000}” whose (exists value “UninstallString” of it) of native registry}
// Run the uninstallation command
waithidden {value “UninstallString” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{D6932D97-36F1-40B8-9CDC-CA8365B21000}” of registry as string}
// Log success
appendfile Uninstallation completed successfully.
else
// Log failure
appendfile Registry key or uninstall string not found.
endif
I am getting the following error: Command failed (Relevance substitution failed) waithidden {value “UninstallString” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{D6932D97-36F1-40B8-9CDC-CA8365B21000}” of registry as string}
In the fixlet debugger I am sucessfully running
exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{D6932D97-36F1-40B8-9CDC-CA8365B21000}” whose (exists value “UninstallString” of it) of native registry
Any assistance would be greatly appreciated.
Thank, John
They literal curly brackets in that GUID need to be escaped.
Because you are already in a Relevance Substitution, you do not need to escape the open-bracket. But to stop the close-bracket from ending the Relevance Substitution early, you do need to escape that one as }}
See Tip: Escaping curly brackets for substitutions in ActionScript
And try
waithidden {value "UninstallString" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{D6932D97-36F1-40B8-9CDC-CA8365B21000}}" of registry as string}
Thanks that help to move the action to the next stop, but now it is stuck Running on this line:
waithidden {value “UninstallString” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{D6932D97-36F1-40B8-9CDC-CA8365B21000}}” of native registry as string} /quiet /norestart
That indicates the command is not completing, likely because those parameters are.not correct for a silent/unattended install. Because the installer is running hidden, it may be trying to show an error message or confirmation dialog, but it cannot be displayed so the action is stuck.
Try running the commands manually to see what the error may be
In addition to what Jason suggested, it looks like you have a missing backslash as well.
waithidden {value “UninstallString” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{D6932D97-36F1-40B8-9CDC-CA8365B21000}}” of native registry as string} /quiet /norestart
waithidden {value “UninstallString” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall**\**{D6932D97-36F1-40B8-9CDC-CA8365B21000}}” of native registry as string} /quiet /norestart
1 Like