Checking Python check failing WIX

148 Views Asked by At

I have an installer file in which I am checking if the python is installed on the machine or not by checking the registry entry. During testing the same, observed an issue in which the python is not installed on the system. Still, the registry entry for the python is not giving error.

<Property Id='CHECK_PYTHON'>
  <RegistrySearch Id='SearchPyInCU'
              Root='HKCU'
              Key='SOFTWARE\Python\PythonCore\3.6'
              Name='Version'
              Type= "raw"
              Win64="yes"/>
  <RegistrySearch Id='SearchPyInLM'
        Root='HKLM'
        Key='SOFTWARE\Python\PythonCore\3.6'
        Name='Version'
        Type='raw'
        Win64="yes"/>
  <RegistrySearch Id='SearchPyInWoW64'
   Root='HKLM'
   Key='SOFTWARE\Wow6432Node\Python\PythonCore\3.6'
   Name='Version'
   Type='raw'/>
</Property>

On checking found that the registry entry for the python version is still there in the local machine not sure if it is there because of some error during uninstall. However, the default value is blank.

Is there any better way to check if the system has python installed or not?

One option which I can think of using custom action and running the python -v command and checking if it returns an error or not. But I want first to explore some other options.

0

There are 0 best solutions below