Problem: VBS Mapping a Drive in XP Pro 
Author Message
 Problem: VBS Mapping a Drive in XP Pro

Whenever I try and execute the script below, I get the following error:

Error: The local device name has a remembered connection to another network
resource.
Code: 800704B2
Source: WSHNetwork.MapNetworkDrive

The Script:
---------------------
Set WshNetwork = WScript.CreateObject("WScript.Network")

WshNetwork.MapNetworkDrive
"X:","\\alphac.csd.uwm.edu\cghota",True,"cghota","password"
---------------------

I'm trying to map to a DEC Alpha running Samba 2.2.8a.

Any help is highly appreciated!!!

chris.



Tue, 25 Oct 2005 04:30:59 GMT  
 Problem: VBS Mapping a Drive in XP Pro

The error message is very self-explanatory, it's saying the letter X: is
already in use.  If you already have X: mapped, you need to unmap it first.
You can do this using:

WshNetwork.RemoveNetworkDrive "X:", False, True

Read the syntax first:
http://msdn.microsoft.com/en-us/script56/html/wsmthremovenetworkdrive...


Quote:
> Whenever I try and execute the script below, I get the following error:

> Error: The local device name has a remembered connection to another
network
> resource.
> Code: 800704B2
> Source: WSHNetwork.MapNetworkDrive

> The Script:
> ---------------------
> Set WshNetwork = WScript.CreateObject("WScript.Network")

> WshNetwork.MapNetworkDrive
> "X:","\\alphac.csd.uwm.edu\cghota",True,"cghota","password"
> ---------------------

> I'm trying to map to a DEC Alpha running Samba 2.2.8a.

> Any help is highly appreciated!!!

> chris.



Tue, 25 Oct 2005 04:42:48 GMT  
 Problem: VBS Mapping a Drive in XP Pro
I agree with Marty's solution but add that a further thing that may be done
is to check for the existence of a drive x: before acting.  Otherwise the
script may generate errors when it attempts to delete a non-existant drive
unless you use the on error resume next statement.


Quote:

> The error message is very self-explanatory, it's saying the letter X: is
> already in use.  If you already have X: mapped, you need to unmap it
first.
> You can do this using:

> WshNetwork.RemoveNetworkDrive "X:", False, True

> Read the syntax first:
> http://msdn.microsoft.com/en-us/script56/html/wsmthremovenetworkdrive...



> > Whenever I try and execute the script below, I get the following error:

> > Error: The local device name has a remembered connection to another
> network
> > resource.
> > Code: 800704B2
> > Source: WSHNetwork.MapNetworkDrive

> > The Script:
> > ---------------------
> > Set WshNetwork = WScript.CreateObject("WScript.Network")

> > WshNetwork.MapNetworkDrive
> > "X:","\\alphac.csd.uwm.edu\cghota",True,"cghota","password"
> > ---------------------

> > I'm trying to map to a DEC Alpha running Samba 2.2.8a.

> > Any help is highly appreciated!!!

> > chris.



Fri, 28 Oct 2005 20:46:57 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Problem: VBS Mapping a Drive in XP Pro

2. WSHController with XP Pro and XP Home

3. WSH 5.6 and Script Debugger on XP Pro problems

4. Mapping drives based on group membership using ADSI with VBS

5. Mapping Network Drive in VBS

6. Check for drive mapping in vbs?

7. Mapping drives based on group membership using ADSI with VBS

8. How do I map a drive that has already been mapped

9. Problem with Loginscript and drive mapping.

10. get drive size from network network mapped drives

11. cdonts in Windows XP Pro

12. XP Pro, Access, "Undefined Error"

 

 
Powered by phpBB® Forum Software