login script in batch file ..?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hii all ,
i have a problem with creating batch file ..
This file just copy The Reguired Docs from my own computer to a server ..

My code is here ..
-----------------------------
XCOPY /y D:\open123 \\192.168.0.1\backup\ /e
----
it is working ..
but somethimes i get error such as access is denied or something wrong
username and pass..
so how can i add USER and PASS to this script .. so it wont ask User and
PASS,
any help will most welcome ,
 
_kadirbek_ said:
hii all ,
i have a problem with creating batch file ..
This file just copy The Reguired Docs from my own computer to a server ..

My code is here ..
-----------------------------
XCOPY /y D:\open123 \\192.168.0.1\backup\ /e
----
it is working ..
but somethimes i get error such as access is denied or something wrong
username and pass..
so how can i add USER and PASS to this script .. so it wont ask User and
PASS,
any help will most welcome ,

You could do something like this to establish your credentials:

net use \\192.168.0.1\ipc$ /user:SomeUser SomePassword
XCOPY /y /d /e D:\open123 \\192.168.0.1\backup\ /e

It is, of course, very bad security policy to put an account
name and password inside a batch file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top