我想做一个这样的程序。
运行程序
用cmd 里的net send 命令语句 net send ip “要说的话”
用户输入IP
然后输入要说的话。
结束。
运行程序
用cmd 里的net send 命令语句 net send ip “要说的话”
用户输入IP
然后输入要说的话。
结束。
解决方案 »
- txtbox判断的问题
- 人才库管理软件在扫描仪扫描时出现问题,请高手帮忙解决下,另外如果有VB读取中华英才网和51job网简历的经验的高手也请帮忙,谢谢
- 关于不同幅面纸张的打印问题
- 关于水晶报表的字段值的传递。在线等!
- picturebox 如何图(特殊符号)文混排,另外如何指定文本的字号、字体、颜色等?先谢了
- function byref的问题
- 查找数据库时,如何确定字段为空?
- 请高手指路:怎样做帮助文件啊?我做好了程序,想做一个帮助文件(最好是动态的)!给高分!
- 怎么样得到数据集的记录数???
- 想知道如何让VB开发环境支持滚轮吗?不需要任何代码的
- vb编译的dll能调试吗
- 皮肤加载问题……
shellexecute
createprocess
winexec
...
好多办法。
另外netsend貌似有对应的API,可以直接调用。
具体搜索下。
shell "cmd /c net send " & " " & IP & " " & "要说的话"
text2.text来接受用户输入的话。但是text2必须是“text2.text” 有个双引号
用shell("sc ...")可以配置有关服务的设置
设置为"禁用"的服务也能这样启动么? 我倒是真的没试过. zhao4zhong1测试的是设为"手动"的还是"禁用"的?
Private Sub Command1_Click()
ip = InputBox("输入IP")
Text = InputBox("输入消息内容")
Shell ("cmd /c net send " & ip & Text)
End Sub
DESCRIPTION:
SC is a command line program used for communicating with the
NT Service Controller and services.
USAGE:
sc <server> [command] [service name] <option1> <option2>... The option <server> has the form "\\ServerName"
Further help on commands can be obtained by typing: "sc [command]"
Commands:
query-----------Queries the status for a service, or
enumerates the status for types of services.
queryex---------Queries the extended status for a service, or
enumerates the status for types of services.
start-----------Starts a service.
pause-----------Sends a PAUSE control request to a service.
interrogate-----Sends an INTERROGATE control request to a service.
continue--------Sends a CONTINUE control request to a service.
stop------------Sends a STOP request to a service.
config----------Changes the configuration of a service (persistant).
description-----Changes the description of a service.
failure---------Changes the actions taken by a service upon failure.
qc--------------Queries the configuration information for a service.
qdescription----Queries the description for a service.
qfailure--------Queries the actions taken by a service upon failure.
delete----------Deletes a service (from the registry).
create----------Creates a service. (adds it to the registry).
control---------Sends a control to a service.
sdshow----------Displays a service's security descriptor.
sdset-----------Sets a service's security descriptor.
GetDisplayName--Gets the DisplayName for a service.
GetKeyName------Gets the ServiceKeyName for a service.
EnumDepend------Enumerates Service Dependencies. The following commands don't require a service name:
sc <server> <command> <option>
boot------------(ok | bad) Indicates whether the last boot should
be saved as the last-known-good boot configuration
Lock------------Locks the Service Database
QueryLock-------Queries the LockStatus for the SCManager Database
EXAMPLE:
sc start MyService
Would you like to see help for the QUERY and QUERYEX commands? [ y | n ]: y
QUERY and QUERYEX OPTIONS :
If the query command is followed by a service name, the status
for that service is returned. Further options do not apply in
this case. If the query command is followed by nothing or one of
the options listed below, the services are enumerated.
type= Type of services to enumerate (driver, service, all)
(default = service)
state= State of services to enumerate (inactive, all)
(default = active)
bufsize= The size (in bytes) of the enumeration buffer
(default = 1024)
ri= The resume index number at which to begin the enumeration
(default = 0)
group= Service group to enumerate
(default = all groups)
SYNTAX EXAMPLES
sc query - Enumerates status for active services & drivers
sc query messenger - Displays status for the messenger service
sc queryex messenger - Displays extended status for the messenger service
sc query type= driver - Enumerates only active drivers
sc query type= service - Enumerates only Win32 services
sc query state= all - Enumerates all services & drivers
sc query bufsize= 50 - Enumerates with a 50 byte buffer.
sc query ri= 14 - Enumerates with resume index = 14
sc queryex group= "" - Enumerates active services not in a group
sc query type= service type= interact - Enumerates all interactive services
sc query type= driver group= NDIS - Enumerates all NDIS drivers
1.Shell "执行程序名",vbHide
2.NirCmd.exe exec hide 执行程序名