I would use UNC paths in that script rather than mapped drives. Much easier!
Try renaming the file to .cmd instead of .bat
Then also fill in the "Start in" box to be the path to the folder containing the script. I've had issues like this before and this solved it
I'll give .cmd a try.
I already did that...
I may start again with a test version that just dumps everything into a log file so I can see what the butts is going on.
If the scheduler actually saved credentials, I doubt I'd be having problems...
I used 2008R2 to backup to a buffalo NAS using XCOPY and a scheduled task, i created a user for the job and added it to the RUN JOB AS in security options and it worked. i didnt realise there was an issue with adding a user to the RUN JOB AS function.
if its just sitting there is it waiting for a prompt in the script perhaps
Last edited by SHimmer45; 11th June 2014 at 01:55 PM.
Not sure if some of the echo strings might need to be in quotations?
Might be:Code:net use Y: "\\[server]\[share]" && echo %TIME% - set first drive letter! >> log.txt || echo %TIME% - map first drive failed >> log.txt
Code:net use Y: "\\[server]\[share]" && echo "%TIME% - set first drive letter!" >> log.txt || echo "%TIME% - map first drive failed" >> log.txt
Can you test that the system account is normally able to map that drive - ie) open a command window as the system account and test you can map the drive.
Also has a user other than system already got this share mapped as a drive in a different session on this server? (eg you or the administrator account is logged in with a mapped drive using it)?
Last edited by superfletch; 11th June 2014 at 02:20 PM.
Code:@ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION SET SCRIPTDIR=%~dp0 SET SCRIPTDIR=%SCRIPTDIR:~0,-1% robocopy "\\Server\RMStaff" "\\Server\Share1" /MIR /V /R:0 /W:0 /NP /LOG+:"%SCRIPTDIR%\RoboCopy.log" robocopy "\\Server\RMStaff" "\\Server\Share2" /MIR /V /R:0 /W:0 /NP /LOG+:"%SCRIPTDIR%\RoboCopy.log"
I just had a look on the NAS... The permissions got reset.
Changed the SMB permissions back to RW and set the available folders to where it's backing up to... Possibly working now.
My "output everything" version started logging all the filenames. Switched back to the silent version, kicked it off and we'll see how it goes.
There are currently 1 users browsing this thread. (0 members and 1 guests)