Broadcast message

Started by jkjk12, July 02, 2014, 07:09:11 AM

Previous topic - Next topic

jkjk12

we have both XP and Windows 7 machines in our environment.   Does WinBatch have a message broadcast command that mimics NET SEND?   I don't want to read a list of machines from a .TXT file, I need it to act like NET SEND that can send out a "system message" to all workstations in our environment.


Deana

Standard Windows 7 does not support msg.exe and net send commands to send messages over network. It appears some version may support msg.exe (possibly windows 7 Ultimate and Enterprise). All other editions will have to use an alternative solution.

Maybe try the Terminal Server Extender function wtsSendMessage. This function can display a message box in any terminal services session. This function can also wait for a user to acknowledge the message box and can then determine which button was clicked.

Code (winbatch) Select
;Load 32-bit or 64-bit extender
AddExtender( "WWWTS44I.DLL" , 0, "WWWTS64I.DLL" )

Title01 = 'Test wtsSendMessage()'
ServerSpec = AskLine('Send a message','Server','')
SessId = AskLine('Send a message','Session Id #','')
TitleText = AskLine('Send a message','Title text','')
MsgText = AskLine('Send a message','Message text','')
MsgStyle = AskLine('Send a message','Message Style','0')
MsgTimeout = AskLine('Send a message','Timeout','0')
MsgWait = AskLine('Send a message','Wait flag','1')
ErrorMode(@OFF)
Result = wtsSendMessage(ServerSpec,SessId,TitleText,MsgText,MsgStyle,MsgTimeout,MsgWait)
RC = LastError()
ErrorMode(@CANCEL)
TempMsg = StrCat('wtsSendMessage("',ServerSpec,'",',SessId,',"',TitleText,'","',MsgText,'",',MsgStyle,',',MsgTimeout,',',MsgWait,') RC = ',RC)
TempMsg = StrCat(TempMsg,@CRLF,@CRLF,'Result = ',Result)
Message(Title01,TempMsg)
Exit



Reference:
http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WIL~Extenders/Terminal~Server+wtsSendMessage~and~Win7.txt
Deana F.
Technical Support
Wilson WindowWare Inc.