I suggest reg functions like:
code:
function WriteRegistry(key, value)
{
var Shell = new ActiveXObject("WScript.Shell");
try {
return Shell.RegWrite(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\" + key, value);
} catch {
return false;
}
}
function ReadRegistry(key)
{
var Shell = new ActiveXObject("WScript.Shell");
try {
return Shell.RegRead(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\" + key);
} catch {
return false;
}
}
function RemoveRegistry(key)
{
var Shell = new ActiveXObject("Wscript.Shell");
try {
return Shell.RegDelete(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\" + key);
} catch {
return false;
}
}
then you have error catching if the key doesnt exist and you try to read it or w/e
(its wierd but i try to read b4 i write
)