Tech Support > Microsoft Windows > MSN Messenger > MsgrObject CreateUser Security
MsgrObject CreateUser Security
Posted by Alexander Tarasul on October 5th, 2005


Hello,
I'm running the script below.
It works fine in VB and in Word. However it's failing when running on WSH
(cscript test.vbs) with the error
C:\Development\IM_SIP\test1.vbs(10, 5) Microsoft VBScript runtime error:
Object required: 'msgr.CreateUser(...)'

There is no documentation about special security on WSH for this function.
Any ideas?

Thanks


Sub test()
Dim msgr
Dim pUser
Dim users
Dim service
Set msgr = CreateObject("Messenger.MsgrObject")
'MsgBox msgr.Services.Count
Set users = msgr.List(0)
Set service = msgr.Services.PrimaryService
Set pUser = msgr.CreateUser("user@ourcompany.com", service)
Call msgr.List(0).Add(pUser)
End Sub


Similar Posts