This script is completely different from the one mentioned here.
Dunno if ur script work, as I said before I can't check it now.
I prefer something simple and easy...
Ne1 know how to fix the ReadRegistry function?
quote:Originally posted by The_Joker
This script is completely different from the one mentioned here.
Dunno if ur script work, as I said before I can't check it now.
I prefer something simple and easy...
Ne1 know how to fix the ReadRegistry function?
How is my script different? You are trying to use an ActiveXObject to read the registry. I am using the Windows API to read the registry. I don't see how this is different at all in any way, aside from mione providing more control; longer code; and using more memory.
quote:Originally posted by Ezra
What is the error code that you get?
And what code do you use exactly?
1. Back to good old 7.5, so I can't check the error number.
2. The code is/are:
code:function ReadRegistry(key)
{
var Shell = new ActiveXObject("WScript.Shell");
return Shell.RegRead(MsgPlus.ScriptRegPath + key);
}
code:function ReadRegistry(key)
{
var Shell = new ActiveXObject("WScript.Shell");
var value = Shell.RegRead(MsgPlus.ScriptRegPath + key);
return value;
}
Both gives the same error if I remember correctly.
quote:Originally posted by Ezra
Only thing I can think of is that the key doesn't excist...
I checked it exists.
It works okay with Debug.Trace but return doesn't.
Also I checked with regedit, it's there.
There is nothing wrong in that latest code. The error is as Ezra suggested the key value you give to the function which doesn't exit or whatever. It works fine here.
This post was edited on 06-29-2006 at 06:18 PM by CookieRevised.