This is the way I'd do it:
code:
var RegScriptPath = MsgPlus.ScriptRegPath; //Get the script registry path
var RegPrefsPath = RegScriptPath.substr(0, RegScriptPath.indexOf("GlobalSettings")) + Messenger.MyEmail + "\\Preferences"; //Get the Plus! preferences path
var sPath = new ActiveXObject("WScript.Shell").RegRead(RegPrefsPath + "\\LogsDirectory"); //Get Plus!' default log directory
EDIT:
@ matty: Note that it's possible that that path changes in a future Plus! version. Therefore, I more like to get the path based on the script's registry path.
And yes, I know that it's more recommended to use Win32 API functions to read the key but I leave that for you to choose whether you want to implement such functions.