Shoutbox

verify presence registry key - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: verify presence registry key (/showthread.php?tid=83385)

verify presence registry key by Suxsem on 04-25-2008 at 06:07 PM

Hi!
if the registry key don't exist and i use shall.regRead the script create an error.
how can verify the presence of registry key?
thank, bye!


RE: verify presence registry key by mynetx on 04-25-2008 at 06:13 PM

Try this one ;)

code:
var boolEnabled = false; // default value
try {
    boolEnabled = new ActiveXObject("WScript.Shell").RegRead(MsgPlus.ScriptRegPath + "\\SomeEntry");
}
catch( e ) {
    // error handling ;)
}
// use boolEnabled here with either default value or read value

RE: verify presence registry key by Suxsem on 04-25-2008 at 06:15 PM

VERY VERY THANK!
THANK FOR SPEED TOO!
bye :)