vb基础   vb实例教程   api调用   控件使用   经验技巧   数据库操作   算法及技术   vb源码下载
您的位置:首页 >> vb教程 >> 经验技巧  

保证连网计算机时间同步
出处:网络

执行命令:

net time "\\OhterComputerName" /set /yes 可以保证名称为OhterComputerName 的计算机与本机时间同步。

Public Sub SyncTime()

Dim thecomp As String

Dim theshell As String

thecomp = "\\computername"

theshell = "net time " & Chr(34) & thecomp & Chr(34) & " /set /yes"

x = Shell(theshell)

End Sub

[返回]

     

首页 | 设为首页 | 加入收藏 | 关于本站 | 友情链接 | 版权声明

     
 
Copyright© www.bianceng.cn Powered by 编程入门网 All Rights Reserved
吉ICP备06005558号