Deleting a previously installed version of my software?
My install script currently writes a value to the registry which points the uninstall.exe file that get created during the install process. The line looks like this:
WriteRegStr ${UNINSTALL_ROOT_KEY} "${UNINSTALL_KEY}" "UninstallString" "$INSTDIR\uninstall.exe"
I would like to add logic to the beginning of my script that would check for the existence of this registry value, and if it exists, remove the previous version of my software by calling that uninstall.exe file.
Does anyone currently do this? The pseudo-logic would look like this:
if (registry_key.exists)
{
Variable x = registry_value;
Execute(x);
}
I'm not exactly sure how to check for the existance of a specific registry key, and then get the value for that key. Also, I then need execute the .exe file that is pointed to by that value.
Thank You,
Kennedy