Monday, November 23, 2009

check the map drive present remotely

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

Print Friendly and PDF
Share/Bookmark

No comments:

Post a Comment