Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm wondering if it's possible to add a Network Location via the command prompt? This is not a drive letter mapping mind which can be achieved using the net use command.

share|improve this question
    
do you mean a connection to a unc path? you could use pushd if you don't want to use net use. pushd \\server\share or if you need to authenticate against the share and don't want to use a drive letter: net use \\server\share <pass> /user:<user> && pushd \\server\share – grub Oct 2 '10 at 14:07
    
No dice - this is the network locations available from Vista onwards... – noonand Nov 7 '10 at 19:16
up vote 0 down vote accepted

Here is a script how to achieve this:How Can I Create a Shortcut in My Network Places?

To use them:

  • Copy the code into a Notepad file
  • Click File menu & choose SaveAs
  • Surround the file name in double quotes including the extension (") Example "Network Place Scrript.vbs"
  • In the File Types choose All Files
  • Click the Save button
share|improve this answer
    
Superb, thanks for that! I had actually come across that article but neglected to circle back to this question. Fair dues to you for doing so. – noonand Mar 8 '11 at 9:19
    
People going to that article should read the very informative comment made by JRV in the comments section. – noonand Jan 8 '13 at 15:06

you can use PUSHD and POPDcommands

    C:\>PUSHD /?
Stores the current directory for use by the POPD command, then
changes to the specified directory.

PUSHD [path | ..]

  path        Specifies the directory to make the current directory.

If Command Extensions are enabled the PUSHD command accepts
network paths in addition to the normal drive letter and path.
If a network path is specified, PUSHD will create a temporary
drive letter that points to that specified network resource and
then change the current drive and directory, using the newly
defined drive letter.  Temporary drive letters are allocated from
Z: on down, using the first unused drive letter found.

C:\>
C:\>
C:\>POPD /?
Changes to the directory stored by the PUSHD command.

POPD


If Command Extensions are enabled the POPD command will delete
any temporary drive letter created by PUSHD when you POPD that
drive off the pushed directory stack.

C:\>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.