Batch script Search for string in registry key ,if found perform uninstallation

Last week,I was working on Intergraph application upgrade to latest version.Client has different versions of Intergraph and the removal of older versions is not straight forward like other applications using msiexec /x{ProductID} /qn. The command line is different for all these versions and I cannot put these command lines in one script and run on…