Prompt for credentials in a batch script

Posted by Inteladu on Super User See other posts from Super User or by Inteladu
Published on 2011-05-02T13:44:59Z Indexed on 2012/06/20 3:18 UTC
Read the original article Hit count: 162

Filed under:
|
|
|
|

I am trying to perform a network copy of files via a batch script. However, as usual there are some networks where the 'copy' command fails saying 'Bad username or password'.

And when I try using xcopy, it never works.

I have also tried using,

net use \\server\ password /user:domain\username
net use \\server\ipc$ /user:domain\username password

But none of these work. Any ideas on how I can accomplish this? I was also wondering if it is possible to prompt the ususal Windows login dialog for this...(just an idea)

Any leads on this would be highly appreciated.
Thanks & Regards,
inteladu

© Super User or respective owner

Related posts about Windows

Related posts about networking