VB同步網絡計算機時間

        

  Dim nX As Integer = 0
        Dim thecomp As String

        Dim theshell As String

        thecomp = "//computername"
        thecomp = "//192.168.1.3"

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

        nX = Shell(theshell)

這裏thecomp可以是機器名,也要吧是IP地址

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章