|
|
Viết bởi: thuyyeu99 19-11-20, 11:01 AM Chuyên mục: Quán cóc - Bài trả lời (7) |
|
|
Viết bởi: buida 18-11-20, 09:52 PM Chuyên mục: Forms - Bài trả lời (2) |
|
|
Viết bởi: maidinhdan 13-11-20, 09:16 PM Chuyên mục: Tương tác Chương trình ngoài - Bài trả lời (6) |
Function PingIP()
Dim oShell, oExec As Variant
Dim strText, strCmd, ComputerName As String
ComputerName = "MAIDINHDAN" 'Ten may tinh/IP may tinh: "192.168.1.11"
strText = ""
strCmd = "ping -n 3 -w 1000 " & ComputerName
Set oShell = CreateObject("WScript.Shell")
Set oExec = oShell.Exec(strCmd)
Do While Not oExec.StdOut.AtEndOfStream
strText = oExec.StdOut.ReadLine()
Debug.Print strText
If InStr(strText, "Reply") > 0 Then
Debug.Print "oK"
Exit Do
Else
Debug.Print "Khong tim thay"
End If
Loop
End Function
Function HienThiTenMayDangOnline()
Dim oShell, oExec As Variant
Dim strText, strCmd As String
strText = ""
strCmd = "Net view" ''HienThiTenMayDangOnline
Set oShell = CreateObject("WScript.Shell")
Set oExec = oShell.Exec(strCmd)
Do While Not oExec.StdOut.AtEndOfStream
strText = oExec.StdOut.ReadLine()
If Left(strText, 2) = "\\" Then
Debug.Print strText
End If
Loop
End Function
Function HienThiIPDangOnline()
Dim oShell, oExec As Variant
Dim strText, strCmd As String
strText = ""
strCmd = "arp -a" ''HienThiIPDangOnline
Set oShell = CreateObject("WScript.Shell")
Set oExec = oShell.Exec(strCmd)
Do While Not oExec.StdOut.AtEndOfStream
strText = oExec.StdOut.ReadLine()
If Left(strText, 14) = "Interface: 192" Then Debug.Print strText
If Left(strText, 6) = " 192." And Right(strText, 10) = "dynamic " Then
Debug.Print strText
End If
Debug.Print strText
Loop
End Function
Function ThongtinMayTinh()
Dim oShell, oExec As Variant
Dim strText, strCmd As String
strText = ""
strCmd = "SystemInfo" '
Set oShell = CreateObject("WScript.Shell")
Set oExec = oShell.Exec(strCmd)
Do While Not oExec.StdOut.AtEndOfStream
strText = oExec.StdOut.ReadLine()
Debug.Print strText
Loop
End Function
Function DichvuDangchay()
Dim oShell, oExec As Variant
Dim strText, strCmd As String
strText = ""
strCmd = "tasklist" '
Set oShell = CreateObject("WScript.Shell")
Set oExec = oShell.Exec(strCmd)
Do While Not oExec.StdOut.AtEndOfStream
strText = oExec.StdOut.ReadLine()
Debug.Print strText
Loop
End Function
Function TatDichvuDangchay(TenDichVuCanTat As String)
Dim oShell, oExec As Variant
Dim strText, strCmd As String
strText = ""
strCmd = "taskkill /f /im " & TenDichVuCanTat '
Set oShell = CreateObject("WScript.Shell")
Set oExec = oShell.Exec(strCmd)
Do While Not oExec.StdOut.AtEndOfStream
strText = oExec.StdOut.ReadLine()
Debug.Print strText
Loop
End Function
|
|
Viết bởi: ngminh 11-11-20, 08:47 PM Chuyên mục: Forms - Bài trả lời (1) |
|
|
Viết bởi: Hồ Bình 11-11-20, 08:06 PM Chuyên mục: Thư viện thủ thuật - Bài trả lời (1) |
| Chủ đề Mới nhất |
| tripscan — Как планироват... -Chuyên mục: MS Word-Đăng bởi lần cuối: Leonfurry-3 Giờ trước- » Bài trả lời: 0- » Lượt xem: 1 |
| SkterjeadS -Chuyên mục: MS Word-Đăng bởi lần cuối: CarrollHut-4 Giờ trước- » Bài trả lời: 0- » Lượt xem: 1 |
| Quản Lý Phòng Khám Tư Nhâ... -Chuyên mục: Thư Viện Ứng Dụng-Đăng bởi lần cuối: Le Duc-24-09-26, 12:03 AM- » Bài trả lời: 34- » Lượt xem: 8,345 |
| Tạo Form không có khung v... -Chuyên mục: Thư viện thủ thuật-Đăng bởi lần cuối: ongke0711-05-09-26, 10:12 PM- » Bài trả lời: 0- » Lượt xem: 148 |
| Tải hàng loạt hóa đơn PDF... -Chuyên mục: Thành viên giúp nhau-Đăng bởi lần cuối: dotrung-16-08-26, 10:29 PM- » Bài trả lời: 6- » Lượt xem: 160 |
| Quản lý kho bằng Accesss -Chuyên mục: Thảo Luận Access-Đăng bởi lần cuối: AKBui-09-08-26, 12:52 AM- » Bài trả lời: 77- » Lượt xem: 8,102 |
| Tra cứu Mã số thuế - phần... -Chuyên mục: Share Code-Đăng bởi lần cuối: ongke0711-03-07-26, 02:10 PM- » Bài trả lời: 0- » Lượt xem: 183 |
| Đồ cổ đây - một chút hoài... -Chuyên mục: Góc ảnh-Đăng bởi lần cuối: Noname-12-06-26, 09:21 AM- » Bài trả lời: 1- » Lượt xem: 661 |
| Tra cứu thông tin DN qua ... -Chuyên mục: Thư Viện Ứng Dụng-Đăng bởi lần cuối: ongke0711-02-06-26, 11:36 PM- » Bài trả lời: 0- » Lượt xem: 186 |
| Homestay chill đà lat -Chuyên mục: Góc Blogger-Đăng bởi lần cuối: tt1212-01-06-26, 02:51 PM- » Bài trả lời: 0- » Lượt xem: 635 |
| Diễn đàn Thống kê |
|
» Thành viên: 0 » Thành viên mới nhất: Không có ai » Các chủ đề diễn đàn: 0 » Các bài viết diễn: 0 Thống kê đầy đủ |