findinf path to the executable of installed application

by Aug 8, 2014

Hi All, 

I would like to ask for your opinion in indicating path to the executable related to the installed application. Namely I am trying to run openssl.exe in order to generate SSL entity certificate and key which I defined as follows:

$OpenSSL =  "C:Program Files (x86)OpenSSL_1.0.1.8openssl.exe"

However the script should be able to run on different OS with different version of OpenSSL have been  installed. So that I wonder what could be the way to determine the path to the valid aopenssl executable on local computer. I supose it is somewhat connected with searching through the registry. I would appreciate any opinion on the issue. 

Thank you in advance and Cheers,

E