What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Read another HKEY

Read another HKEY
Author: Message:
PedroGabriel
Junior Member
**


Posts: 22
– / – / Flag
Joined: Jun 2010
O.P. Read another HKEY
Hi,
I want know how to read another HKEY...
Eg:
Javascript code:
var
  Reg1 = 0;
  Reg1Path = "HKEY_CURRENT_USER\SessionInformation"+"\\ProgramCount";
  Shell = new ActiveXObject('WScript.Shell');
 
 
function Read(){
    Reg1 = Shell.RegRead(Reg1Path);
return Reg1;
}
 
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, rMessage, MsgKind){
    if (rMessage == 'aaa'){
        Read();
        Messenger.MyPersonalMessage = Reg1;
        ChatWnd.SendMessage(Reg1);
    }
}


I only find HKEY_CURRENT_USER\SessionInformation\ProgramCount
on the WinXP, this reg show how many apps are running

How to read that?

Thanks  for attention =]

This post was edited on 12-03-2010 at 08:48 AM by PedroGabriel.
12-03-2010 08:35 AM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Read another HKEY
If I am not mistaken you need to use HKCU instead of HKEY_CURRENT_USER. Also you need to escape your backslashes (\\).

http://msdn.microsoft.com/en-us/library/x05fawxd(VS.85).aspx

This post was edited on 12-03-2010 at 12:09 PM by matty.
12-03-2010 12:06 PM
Profile E-Mail PM Find Quote Report
PedroGabriel
Junior Member
**


Posts: 22
– / – / Flag
Joined: Jun 2010
O.P. RE: Read another HKEY
Oh thanks for your help =]
that works
Javascript code:
Reg1 = Shell.RegRead ("HKCU\\SessionInformation\\ProgramCount");


Ty.
12-03-2010 05:40 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On