?
Solved

how to get MSN and Windows Messenger connection setting using vbscript?

Posted on 2007-10-02
5
Medium Priority
?
436 Views
Last Modified: 2009-12-16
As the subject said: I will like to know how to get MSN and Windows Messenger connection setting using vbscript when this one is different from windows explorer settings?

I mean, the setting on Messenger Menu -> Tools -> Options -> Connection -> Advange Settings
0
Comment
Question by:solohayuno
  • 3
  • 2
5 Comments
 
LVL 65

Accepted Solution

by:
RobSampson earned 1500 total points
ID: 20003381
Hi, I would think the only way to retrieve the values of such preferences would be to enumerate the following registry key's values:
HKEY_CURRENT_USER\Software\Microsoft\MessengerService

Regards,

Rob.
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 20003388
There will be a value there, such as HTTPProxy, that will give you the address that MSN is using.

Rob.
0
 

Author Comment

by:solohayuno
ID: 20006353
Thanks RobSampson,

Your comment give me to this point who let me get what I was looking for:

strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\default:StdRegProv")

'Get Windows Messenger HTTPProxy
strKeyPath = "Software\Microsoft\MessengerService"
strValueName = "HTTPProxy"
oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
WMHTTPProxy = strValue

'Get MSN Messenger HTTPProxyUsername
strKeyPath = "Software\Microsoft\MSNMessenger"
strValueName = "HTTPProxyUsername"
oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
MSNHTTPProxyUsername = strValue

Thanks a lot!
0
 

Author Comment

by:solohayuno
ID: 20006365
Ok, I forgot something important, here is the complete codeñ

Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002

strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\default:StdRegProv")

'Get Windows Messenger HTTPProxy
strKeyPath = "Software\Microsoft\MessengerService"
strValueName = "HTTPProxy"
oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
WMHTTPProxy = strValue

'Get MSN Messenger HTTPProxyUsername
strKeyPath = "Software\Microsoft\MSNMessenger"
strValueName = "HTTPProxyUsername"
oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
MSNHTTPProxyUsername = strValue
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 20010546
Great, well done.  No problem.

Regards,

Rob.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello again, all.  For those of you that have been following along, you'll know that this is my third article on this topic (though it is not Part III).  This article is sort of remedial, and probably the topic with which I should have started the s…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Loops Section Overview
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question