mIRC Home    About    Download    Register    News    Help

Print Thread
#209470 14/02/09 04:41 AM
Joined: Dec 2007
Posts: 24
T
Tzar469 Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2007
Posts: 24
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,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
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)


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Dec 2007
Posts: 24
T
Tzar469 Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2007
Posts: 24
That works great! Thank you so much! laugh


Link Copied to Clipboard