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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I send a message to an NT user's machine

T-SQL Hints and Tips

How can I send a message to an NT user's machine

by  gcole  Posted    (Edited  )
/*

June 7, 2002

Author: Gail Cole

Purpose: Sent a NET message to the logged in user
Inputs: Message to send
Modifed:

*/

CREATE PROCEDURE sp_db_SentNETMessage
@Msg varchar(100)
AS
set nocount on

DECLARE @Cmd as varchar(1000)
DECLARE @Host as varchar (50)

Set @Host = Host_name()

Set @Cmd = 'net send ' + @Host + ' ' + @Msg
execute master..xp_cmdshell @Cmd
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top