Check map driver present PC:
Dim objNetwork : Set objNetwork = CreateObject("WScript.Network")
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.DriveExists("X:") Then
Set WSHShell = CreateObject("Wscript.Shell")
WSHShell.Run ("E:\Testing_file\test2\map_drive_check.bat")
End If
The bat to record the hostname
hostname >> E:\Testing_file\test2\a.txt
No comments:
Post a Comment