mIRC Home    About    Download    Register    News    Help

Print Thread
#209470 14/02/09 04:41 AM
T
Tzar469
Tzar469
T
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?

Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
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)

T
Tzar469
Tzar469
T
That works great! Thank you so much! laugh


Link Copied to Clipboard