1.

Solve : Send credentials via Batch?

Answer» HI all.
The question I'm making could be trivial, but I'm not a DOS expert, so...

I'm writing a batch file that makes a backup from a main server to another one, that is something LIKE this:

NET USE Y: \\BKP_IP\C$
xcopy C:\DIR\*.* Y:\DIR\ /s /E /Y
.....
Net use Y: /d


Obviously, I'm executing this batch as an ADMIN user on the main server; the problem is that I have to send username and password of an admin user of the backup server by command line (that is, I'm prompted to do that).

So, what I'd need is a way to write these credentials (username+password of the destionation server) in the batch file, in order to allow me to schedule the batch.

Note that the two servers are not on the same domain, so there's not any "common" PROFILE to be used.

THANKS in advance for helping me!!Try this

net use h: \\servername\c$ /user:servername\username yourpassword

I might have miss understood the question.

Do you have rights to map admin shares but not copy files from the share?
Great!
That's what I was looking for!

I've just tried it and it works...
thanks a lot for your help!


Discussion

No Comment Found