How to check if Blender is installed on computer
You are talking about windows machine, I suppose.

The answer is here: Detecting installed programs via registry

The only thing specific to Blender is what to look for in registry:


HKEY_CURRENT_USER\Console\paths_to_blender_executables - you will find here entries for ALL Blenders (versions installed or only executed from .zip archives). There is no assurance that Blender is still on the system though, just that it was in some point in time
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.blend - here is the Blender reference to .blend file. Also can be misleading if Blender was not uninstalled properly.
HKEY_LOCAL_MACHINE\SOFTWARE\BlenderFoundation\ or HKEY_CURRENT_USER\Software\Blender Foundation\ - both are what you are looking for