开发者

How to change the path of a mapped drive in win7?

How to change the path of a mapped drive in win7?

Now it's mapped to \\192.168.248.128,how to change it to \\192.168.66.2 instead开发者_Go百科?


If you want to use the command line have a look to the next answer below!

But you can also edit the settings in Windows Registry: 'HKEY_CURRENT_USER\Network\[Drive letter]'

When you now open a new 'My Computer' window - after changing the target in registry - you will likely see the old settings, but that is only a visual problem. Try to open the entry, and it should work!

Have a look to Chris Budys interesting comment below, that fixes obviously the visual problem.


net use can modify a drive in place without deleting and recreating. You simply execute the command as if you're mapping a new drive, and it replaces it instead. The command syntax is:

net use [Drive name] [UNC path]

Example:

C:\> net use U: \\192.168.66.2
U: has a remembered connection to \\192.168.248.128. Do you
want to overwrite the remembered connection? (Y/N) [Y]: y
The command completed successfully.


You can create another mapped network drive:

  • right-click the current drive and click "Disconnect"
  • right-click "Computer" and select Map Network Drive
  • configure the new drive

If you want Windows API you can use WNetAddConnection2.

If you want a BAT (command line) you can try net use command line option.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜