darksimoon Posted February 3, 2008 Share Posted February 3, 2008 hello friends i want to use the below script as backup solution:xcopy /E /Y /Q "C:\Documents and Settings\alper\Desktop\*.*" "D:\backup\alper\*.*"this script is for the account called alper which is password protected. but i wanna run this script from another account which is unprotected but it doesnt work for the account alper is password protected. so how can i solve this problem ? thanks in advance Link to comment Share on other sites More sharing options...
IcemanND Posted February 4, 2008 Share Posted February 4, 2008 Either you have to add the other account to have permissions to the folder(s), or authenticate as with that users id and credentials before copying. Link to comment Share on other sites More sharing options...
sTe Posted February 4, 2008 Share Posted February 4, 2008 You might want to look into Scheduled Tasks.You can then set a computer to run a specific task every day/ week etc as you want. And you also set the username / password you want the scheduled task to run as.You dont have to be logged into the PC, just the PC has to be turned on is all.I prefare Robocopy for copying my data.robocopy source destination /e /purge /x / tee /L:Logfile /XO /B - I think these are the settings I use.The beauty of Robocopy - If the file time stamp hasnt change, and the file size is the same - It wont make another copy on the destination if it exists. Link to comment Share on other sites More sharing options...
darksimoon Posted February 4, 2008 Author Share Posted February 4, 2008 hey friends thanks for your suggestions. but what i do is; when i need to reinstall windows, i backup some files from certain folders as in my question. so i just clik on the batch file and it moves\copies my files to D: partition. at this stage some files from password protected account doesnt move to D: partition. i just want to overcome this difficulty. i know that there is a command to solve this issue and i need it. so please help me about it... Link to comment Share on other sites More sharing options...
Arie Posted February 5, 2008 Share Posted February 5, 2008 Try the command "runas". Link to comment Share on other sites More sharing options...
darksimoon Posted February 6, 2008 Author Share Posted February 6, 2008 so can anybody help me connecting these two commands together ? runas /user:alper\MYCOMP andxcopy /E /Y /Q "C:\Documents and Settings\alper\Desktop\*.*" "D:\backup\alper\desktop\*.*" Link to comment Share on other sites More sharing options...
IcemanND Posted February 6, 2008 Share Posted February 6, 2008 single line:runas /user:alper\MYCOMP "xcopy /E /Y /Q """C:\Documents and Settings\alper\Desktop\*.*""" """D:\backup\alper\desktop\*.*""" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now