Lệnh thất bại với lỗi 1231, Không thể truy cập vị trí mạng
net use \localhost\c$
Lệnh trên không hợp lệ vì cú pháp không chính xác.
Bạn đang thiếu một devicecái tên.
computername(trong trường hợp này localhost) nên bắt đầu bằng hai dấu gạch chéo ngược \\(đây là nguyên nhân thực sự gây ra lỗi).
Trên một máy Windows 7 khác, lệnh này được hoàn thành thành công.
Điều đó là không thể vì nó là một lệnh không hợp lệ.
Hãy thử lệnh sau (thay thế ký tự ổ đĩa cho phù hợp):
net use j: \\localhost\c$
Bạn cũng có thể sử dụng:
net use \\localhost\c$
nhưng điều này có vẻ là một lệnh vô nghĩa vì điều này đang tạo ra một tham chiếu từ xa (đến một tài nguyên cục bộ) không có tham chiếu cục bộ ( device name) mà thực sự có thể tham chiếu đến nó.
Thí dụ:
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.
Cú pháp
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}]
Đọc thêm