0

I'm trying to set up a net use .bat file to automatically map a webDAV-folder on Windows-boot, but I can't, for the love of god, make it work. I tried like 30 combinations suggested on the Windows-forum, superuser and god knows where but none of them work.

My problem is, that the net use command I'm using works when I omit the password but when I insert the password and execute the .bat it doesn't (the password entered here is only true for special characters, not for the numbers and letters):

net use Y: \\www.example.us@SSL\webdav /user:user01 1A*gX_~)a"];->Ku

When I simply put the above command without the password in a .bat file and execute it, I get prompted for a password and when I enter it, the drive get's mapped without problem. But when I put the password in the command and execute it, the CMD-window just opens and closes immediately without mapping the drive. I'm starting to think it is because the password was created with the keepass generator and the command doesn't like one of the special characters in it. That's why I pasted the password above, so someone might tell me if that's the problem. Also keep in mind, that the command without the password works, so I guess the command without the password is not the problem.

Thanks for the help.

4
  • 2
    ...the CMD-window just opens and closes immediately without mapping the drive. Try to add the pause command after net use to prevent the window from closing, to see an error message... And try to run the .bat as the administrator using mouse right-click.
    – Jackdaw
    Commented Aug 19, 2023 at 16:08
  • Well, it just says System Error 1244 occured and that the user could not be authenticated. The weird thing is, the password is correct. Adding the namespace also didn't change anything.
    – user1819753
    Commented Aug 19, 2023 at 17:40
  • 2
  • Does your password really contain a > character? The sequence >Ku causes the output of the command in front of it to be redirected to a file named Ku. Only the characters before that will be interpreted as password. Commented Dec 7, 2023 at 13:37

0

You must log in to answer this question.