Adding a network location via a command prompt?

16,539

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:
16,539

Related videos on Youtube

noonand
Author by

noonand

My background is in science, specifically biochemistry and microbiology. However one year worth of streaking petri dishes looking for faecal matter is more than enough for anyone! While I primarily focus on .NET tools and technologies, I have a good deal of experience outside of the Microsoft world. When not developing applications or tinkering with computers, I try to masquerade as a normal human being. I have the same T-shirt as Marc Gravell, but alas for me, I'm afraid the similarities end there ;-)

Updated on September 17, 2022

Comments

  • noonand
    noonand almost 2 years

    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.

    • BearInATie
      BearInATie over 13 years
      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
    • noonand
      noonand over 13 years
      No dice - this is the network locations available from Vista onwards...
  • noonand
    noonand over 13 years
    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
    noonand over 11 years
    People going to that article should read the very informative comment made by JRV in the comments section.