Check the real-time performance, and availability statistics, for any device on your network. Thus utility makes it easy to check the health of a router or firewall. Guy Recommends SolarWinds’ Free Network Monitor Note 2: Surprisingly, you do not need the network path. Note 1: The basic RemoveNetworkDrive is a simple command with no commas and only one argument – the drive letter. ‘ Guy’s Script ends here VBS Learning Points Set objNetwork = CreateObject("WScript.Network") ‘ Version 1.3 – May 2012 (Update thanks to Glenn Dhooghe) ‘ VBScript to disconnect network drive H: You need an H: drive before the script has any network drive to remove.Otherwise there would be nothing to remove and all you would get is Error: ‘This network connection does not exist’ Example 1 – Simple RemoveNetworkDriveĮven though RemoveNetworkDrive is easy, we need preparation in the form of drive that has already been connected. Setting bUpdateProfile to true tells VBScript to update the user’s profile. (Rather like ‘coming ready or not’ in hide and seek.) bForce means remove the drive even if its in use. The b in bForce and bUpdateProfile means Boolean, this helps us by knowing that we should just add true or false. RemoveNetworkDrive strDriveLetter, bForce, bUpdateProfile What you do need is – just the plain drive letter.Įven mastering the advanced arguments is not difficult, just watch out for the commas, here is the full syntax: You do not need a comma before the drive letter, and you do not need the name of the network share. If there is a danger it’s what I call ‘over think’. Mastering the basics of RemoveNetworkDrive are easy. ObjNetwork.RemoveNetworkDrive strDriveLetter Normally, you just need two elements, the method, RemoveNetworkDrive and the drive letter. My friend ‘Barking’ Eddie love logoff scripts, and he includes a RemoveNetworkDrive in his tidy-up routine. Now I could use On Error Resume Next, but that may mask other problems with the script, so I add a RemoveNetworkDrive statement.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |