mIRC Homepage
Posted By: Tzar469 Reading from the registry - 14/02/09 04:41 AM
Hi! I'm making a script that will launch an application. The trouble with this is that not everyone installed the application in the same place. However, the installer does write the install path to the registry: HKLM\Software\Westwood\ApocRise\InstallPath

Is there a way to read the information stored in this registry key?
Posted By: argv0 Re: Reading from the registry - 14/02/09 04:43 AM
Quick little google search found this on mirc.org:
Code:
alias regread {
 if ($com(rr)) { !.comclose rr }
 !.comopen rr WScript.Shell
 var %a = $com(rr,RegRead,3,bstr,$1-)
 var %a = $com(rr).result
 !.comclose rr
 !return $iif(%a,%a,$null)
}


//echo -a $regread(HKLM\Software\Westwood\ApocRise\InstallPath)
Posted By: Tzar469 Re: Reading from the registry - 15/02/09 07:10 AM
That works great! Thank you so much! laugh
© mIRC Discussion Forums