Jump to content

Info: net use command returns system error 1312


Recommended Posts

Posted

...This stumped me for too long...

Running the command:

net use P: \\Desktop1\MyShare MyPassword /user:MyUser

kept returning this:

System error 1312 has occured.

A specified logon session does not exist. It may already have been terminated.

:huh:??

The correct way to do it...

net use P: \\Desktop1\MyShare MyPassword /user:Desktop1\MyUser

Provide the logon server and the username to the /user command...

Im sure 99% of ya knew this already... :whistle:

  • 1 month later...

Posted

You got the username and password backwards. /user:username password

If your password has any spaces or percent signs or other special characters, you cant put it in the command line - it confuses the command line parser.

Make a command script like this:

rem Make sure P Drive does not exist

net use P: /D

rem Delete any secure channel connections

net use \\Desktop1\IPC$ /D

rem Map the drive

net use P: \\Desktop1\MyShare /user:MyUser MyPassword

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...