|
以下这段函数实现了向目标计算机发送消息的功能:
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Declare Function SendMsg(computer as string,txt as string)
Function SendMsg(computer as string,txt as string)
dim operate as string
operate="/c net send " & computer & " " & txt
shellexecute 0,"open","cmd.exe",operate,"c:\",0
End Function
将其中的 Net Send 命令换成你所需要的 DOS 命令就可以了 |
|