Net use \\ localhost \ c $ - 命令失败,错误1231


1

在我的Windows 7 x64上,我正在尝试执行此命令:

net use \\ localhost \ c $

但命令失败,错误1231,无法访问网络位置。我试图重新创建管理员共享c $(c :),但它是相同的情况。在另一台Windows 7计算机上,此命令已成功完成。我能做什么 ?谢谢 !


你错过了localhost上的反斜杠。它应该是\\ localhost ...你试过127.0.0.1吗?为什么要为本地资源映射本地驱动器?
太阳

你能看到C$行政份额net view localhost /all吗? net view 127.0.0.1 /allnet view %COMPUTERNAME% /allnet share
JosefZ 2016年

Answers:


1

该命令失败,错误1231,无法访问网络位置

net use \localhost\c$

由于语法不正确,上述命令无效。

  1. 你错过了一个device名字。

  2. computername(在这种情况下localhost)应该以两个反斜杠开头\\(这是错误的实际原因)。

在另一台Windows 7计算机上,此命令已成功完成。

这是不可能的,因为它是一个无效的命令。

请尝试以下命令(根据需要替换驱动器号):

net use j: \\localhost\c$

你也可以使用:

net use \\localhost\c$

但这似乎是一个毫无意义的命令,因为这是创建一个远程引用(到本地资源),没有device name可以实际引用它的本地引用()。

例:

F:\test>net use j: \\localhost\c$
The command completed successfully.


F:\test>net use
New connections will be remembered.


Status       Local     Remote                    Network

-------------------------------------------------------------------------------
OK           J:        \\localhost\c$            Microsoft Windows Network
The command completed successfully.

F:\test>net use \\localhost\c$
The command completed successfully.


F:\test>net use
New connections will be remembered.


Status       Local     Remote                    Network

-------------------------------------------------------------------------------
OK                     \\localhost\c$            Microsoft Windows Network
The command completed successfully.

句法

F:\test>net use /?
The syntax of this command is:

NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]
        [/USER:[domainname\]username]
        [/USER:[dotted domain name\]username]
        [/USER:[username@dotted domain name]
        [/SMARTCARD]
        [/SAVECRED]
        [[/DELETE] | [/PERSISTENT:{YES | NO}]]

NET USE {devicename | *} [password | *] /HOME

NET USE [/PERSISTENT:{YES | NO}]

进一步阅读


如何制作任何%username%?
Kangarooo

@Kangarooo我不明白你的评论。
DavidPostill
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.