VBS Script Error The local device name is already in use

I am working with a logon script that someone else wrote and wandering if anyone could help straighten it out.
Scripting error
Line: 22
Char: 1
Error: the local device name is already in use.
Code: 80070055
Source: WSHNetwork.MapNetworkDrive

Sub DriveMapper(Drive, Share)
For i = 0 to oDrives.Count -1 Step 2
if LCase(Drive) = LCase(oDrives.Item(i)) then
if not LCase(Share) = LCase(oDrives.Item(i+1)) then
WshNetwork.RemoveNetworkDrive Drive, true, true
Else
Exit Sub
End if
End if
Next
WshNetwork.MapNetworkDrive Drive, Share
End Sub

For i = 0 to oDrives.Count -1 Step 2
if strDrive = LCase(oDrives.Item(i)) then
if not strShare = LCase(oDrives.Item(i+1)) then objNet.RemoveNetworkDrive strDrive, true, true
End if
Next
objNet.MapNetworkDrive Drive, Share

On the first respnse what would i change that line to? And on the second response,, well here is what we are trying to accomplish. We want the login script to run without error whether we are plugged into our netowrk here or if we login to our tablets from say at home it will still map the drive and get no errors and be persistent, will the shorter version do this?

Not sure if I should put this here or open another but after looking at this a little farther i got the following error once running it.
Windows Script Host
Line: 11
char: 1
error: Object required: 'WshNetwork'
code: 800A01A8
Source: Microsoft VBscript Runtime error

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

For i = 0 to oDrives.Count -1 Step 2
if strDrive = LCase(oDrives.Item(i)) then
if not strShare = LCase(oDrives.Item(i+1)) then objNet.RemoveNetworkDrive strDrive, true, true
End if
Next
objNet.MapNetworkDrive Drive, Share

I copied your short version and pasted it into a blank vbs file and called it default.vbs, when I run it I get that error. Should I have put it into my original script somewhere? Or is it supposed to run by itself?

Script to copy or move mouse-selected collection of files plus targets referenced by shortcuts (.lnk)
The purpose of this article is to help illuminate the real challenges and options available (where they may exist) for utilizing simple scriptin…

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed.
What it does:
1.) Creates log file in the directory the script is run from (if it doesn't already exist)
2.) Sweep…

You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes.
Assigning simple products to configurable: We assigned simple products…