Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows Message

Status
Not open for further replies.

AppSpecialist

Programmer
Jul 6, 2001
64
CA
I'd like to be able to periodically send a windows message to a list of users when a set of criteria is met.

I took a look at the MSG command, but this only send a message to me. I cannot get it to work to send a message to other users.

Anyone have any ideas?

Thanks
 
take a look at net send command. From a command prompt type net send /? You should be able to send a message to a list opf users.
 
Yes,

I thought about that but I am running XP, SP2 and the windows messenger service is disabled, so I'd have to start that up over and over again.

Thus the reason why I tried using the MSG command.
 
can you not start the messenger service in a vb script, and then do the net send command in a vb script?
 
here's a vb code to start the service. it will start netsvcs and its dependents.
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colServiceList = objWMIService.ExecQuery _
("Select * from Win32_Service where Name='Netsvcs'")

For Each objService in colServiceList
errReturn = objService.StartService()
Next

Wscript.Sleep 20000

Set colServiceList = objWMIService.ExecQuery("Associators of " _
& "{Win32_Service.Name='Netsvcs'} Where " _
& "AssocClass=Win32_DependentService " & "Role=Dependent" )
For Each objService in colServiceList
objService.StartService()
Next
and the message part is here:

Set wshshell = WScript.CreateObject("WScript.Shell")
msg1="net send computer_name your_message" & msg0
wshshell.Run("cmd.exe /c " & msg1)


 
So go into services, enable it and set it to automatically start.
 
I started the service... but do other users also need it started? I get the same problem, the message gets delivered to me but not to any other user?

I am using the user name, manchine name would not be appropriate for me to use.
 
Is there a good alternative to NET SEND for Intranet messaging
thread779-1075637

Other communicators inbuilt.

Winchat.exe
NetMeeting (Conf.exe)
Net Send (From a Command Prompt)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top