Hello. I do cmd-file with connecting a network resource:
net use o: \\nadia-book\d$ /USER:Администратор 12345
If this is typed simply by a command, it works. And if you make a cmd-file, then when you start the file it gives: "Ошибка 86, сетевой пароль указан не верно."
Why is that?

  • and if in quotes it? - ArcherGodson
  • Администратор turns out it was necessary to write in RUSSIAN !!!! - i.e. "¬¬ЁЁЁбва в®а" And Wind cannot check the user to arrange ... too to me ... corporation of monsters! - I_CaR
  • just in Windows there are three different encodings :) - KoVadim
  • In cmd, it is KOI8-R - it seems to be, but in win + R it is in Windows 1251. And what is the third one? - I_CaR

2 answers 2

Good evening. I think you do not have a domain. It gives an error because the network resource is not properly connected via cmd. There is a little different.
It will be correct (though I didn’t check but I think so):

net use o: \ nadia-book \ d $ "password" / user: "username" / SAVECRED

Here is a description from Microsoft

You can even connect balls via vbs for example

WshNetwork.MapNetworkDrive "O:", "\ nadia-book \ d $"

    It turned out to be more banal - the encoding ... in cmd it is in DOS (KOI8-R - it seems to be), and in RUN + cmd it is Windows (1251)
    Neither can connect two Russian languages ​​(console Russian and Russian from GUI)!
    It was necessary to write in Russian! Ie: "¬¬ЁЁЁбва в®а", and I wrote "Administrator" ...
    A long time ago, after all, admin was called Administrator, and now Administrator.
    Hence the troubles.

    • No, the codepage there is codepage 866, it is Alternative GOST. This is not KOI8-R. - Pavel Mayorov
    • And here's what you are wrong about: in RUN + cmd, the default encoding is also 866 and not 1251 at all. Hence the problems. - Pavel Mayorov
    • @PavelMayorov, Then I don’t quite understand why I do all this specifically in the FAR file manager, where there is a button to switch the Russian encoding DOS \ Win and I have to write Russian characters in DOS mode so that they then become krakozyabrami, but working krakozyabrami ? - I_CaR
    • Your letters become wrecks only if for some reason you switch the encoding to windows-1251. - Pavel Mayorov