I am trying to make an application that, if you launch it, it installs the application if the application is not already installed and launches the application if it is. I am trying to do this with Corel Word Perfect. I have built the WordPerfect application with the dependency of the Word Perfect Office installation. To keep the Word Perfect Office Suite to be installed twice I built in a Registry Setting that has a value of 1 if it is installed, and it doesn't install the application if the value exists and =1. I also made sure to put the check in the box for run applicationonce in the Word Perfect Suite install.

When I click the icon, it works well the first time, it installs word Perfect and then launches the application. However, if I try it again, it comes back with an error that the Dependent application failed to install and shows the path to the registry string of the dependent application.