Personal tools

Difference between revisions of "Net use"

From MohidWiki

Jump to: navigation, search
(New page: ==Quick start== Simply choose an available logical drive letter (like ''L:''), a valid UNC path (like ''\\opendap.mohid.com\opendap''), and a valid username on the target machine as well ...)
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
[[Net use]] allows to map network drives programatically. In particular it can help to network with windows NT shares AND linux samba shares.
  
==Quick start==
+
==Syntax==
 +
 
 +
===New network drive===
 
Simply choose an available logical drive letter (like ''L:''), a valid UNC path (like ''\\opendap.mohid.com\opendap''), and a valid username on the target machine as well as on the local machine (like ''datamover'').
 
Simply choose an available logical drive letter (like ''L:''), a valid UNC path (like ''\\opendap.mohid.com\opendap''), and a valid username on the target machine as well as on the local machine (like ''datamover'').
 
  > net use L: \\opendap.mohid.com\opendap password_of_datamover /user:MARETEC\datamover
 
  > net use L: \\opendap.mohid.com\opendap password_of_datamover /user:MARETEC\datamover
  
==External References==
+
===List network drives===
 +
> net use
 +
 +
Status      Local    Remote                    Network
 +
 +
-------------------------------------------------------------------------------
 +
OK          L:        \\opendap.mohid.com\opendap
 +
                                                  Microsoft Windows Network
 +
The command completed successfully.
 +
 
 +
===Delete network drive===
 +
If you want to logon with another username, then you need first to stop all active logons using the following syntax:
 +
> net use L: /delete
 +
 
 +
Otherwise, you will get the following error:
 +
System error 1219 has occurred.
 +
 +
Multiple connections to a server or shared resource by the same user, using more
 +
  than one user name, are not allowed. Disconnect all previous connections to the
 +
  server or shared resource and try again.
 +
 
 +
Or
 +
 
 +
System error 85 has occurred.
 +
 +
The local device name is already in use.
 +
 
 +
==References==
 +
*[[Samba]]
 +
*[http://technet.microsoft.com/en-us/library/bb490717.aspx Microsoft tech center]
  
 
[[Category:Windows]]
 
[[Category:Windows]]
 
[[Category:Linux]]
 
[[Category:Linux]]

Latest revision as of 13:02, 14 April 2009

Net use allows to map network drives programatically. In particular it can help to network with windows NT shares AND linux samba shares.

Syntax

New network drive

Simply choose an available logical drive letter (like L:), a valid UNC path (like \\opendap.mohid.com\opendap), and a valid username on the target machine as well as on the local machine (like datamover).

> net use L: \\opendap.mohid.com\opendap password_of_datamover /user:MARETEC\datamover

List network drives

> net use

Status       Local     Remote                    Network

-------------------------------------------------------------------------------
OK           L:        \\opendap.mohid.com\opendap
                                                 Microsoft Windows Network
The command completed successfully.

Delete network drive

If you want to logon with another username, then you need first to stop all active logons using the following syntax:

> net use L: /delete

Otherwise, you will get the following error:

System error 1219 has occurred. 

Multiple connections to a server or shared resource by the same user, using more
 than one user name, are not allowed. Disconnect all previous connections to the
 server or shared resource and try again.

Or

System error 85 has occurred.

The local device name is already in use.

References