From: Paco on

Thank you for your respons, starting to learn more here now than just the
solution to my problem. :)
The error msg that now shows up in the txt file is:

Does \\srv2\Dokument\IT\CasaWin\bat.bak specify a file name
or directory name on the target
(F = file, D = directory)?


The original batch file (calcjob.bat) that I am trying to get to work looks
like this:
calcjob.exe STARTDATUM= TILLDATUM= PLAN=0 KST=0 FTG=* AVTAL=* ATTOMR=*
BERDATUM=1 AUTOSTOP=1 AUTOSTART=1

I added your >>c:\schedule.txt 2>>&1 to the calcjob batch file and got the
msg.
'calcjob.exe' is not recognized as an internal or external command,
operable program or batch file.

The funny thing I just found out is that if I am using a old domain admin
account ex oldda1 this works like a charm.
But if I uses the new domain admin account I just have made it doesn't work.


Also did a test with unc path vs. share, newDA vs oldDA

oldDA thru unc I get this msg in the txt file
2010-06-16 16:33:54,25 install
'calcjob.exe' is not recognized as an internal or external command,
operable program or batch file.

oldDA thru a share works like a charm.

newDA thru unc and I get the same error as on oldDA thru unc

But if I run the task thru the share with the new Domain Admin account I get
no msg at all in the txt file, and nothing seems to be happening.

The share rights is Users = Full control.
NTFS is: administrators = full, creator owner = full/subdirs,files, system
= full and Users = RE


From: Pegasus [MVP] on
See inline.

"Paco" <Paco(a)discussions.microsoft.com> wrote in message
news:8E10E2BC-DE01-4670-8CF7-20CA67F43213(a)microsoft.com...
>
> Thank you for your respons, starting to learn more here now than just the
> solution to my problem. :)
> The error msg that now shows up in the txt file is:
>
> Does \\srv2\Dokument\IT\CasaWin\bat.bak specify a file name
> or directory name on the target
> (F = file, D = directory)?
*** This message is usually generated by xcopy.exe and can be dealt
*** with by adding a trailing backslash to the target folder.
>
> The original batch file (calcjob.bat) that I am trying to get to work
> looks
> like this:
> calcjob.exe STARTDATUM= TILLDATUM= PLAN=0 KST=0 FTG=* AVTAL=* ATTOMR=*
> BERDATUM=1 AUTOSTOP=1 AUTOSTART=1
> I added your >>c:\schedule.txt 2>>&1 to the calcjob batch file and got the
> msg.
> 'calcjob.exe' is not recognized as an internal or external command,
> operable program or batch file.
*** Robust batch files require all files to be fully qualified with drive
*** and folder name. Do not rely on some path - it might be different
*** in the context of the scheduled task!

>
> The funny thing I just found out is that if I am using a old domain admin
> account ex oldda1 this works like a charm.
*** Pure luck . . .

> But if I uses the new domain admin account I just have made it doesn't
> work.
>
>
> Also did a test with unc path vs. share, newDA vs oldDA
>
> oldDA thru unc I get this msg in the txt file
> 2010-06-16 16:33:54,25 install
> 'calcjob.exe' is not recognized as an internal or external command,
> operable program or batch file.
>
> oldDA thru a share works like a charm.
>
> newDA thru unc and I get the same error as on oldDA thru unc
>
> But if I run the task thru the share with the new Domain Admin account I
> get
> no msg at all in the txt file, and nothing seems to be happening.
*** Time to check the Task Scheduler log file and the Event Logger.
*** Remember that scheduled tasks will not run under accounts with
*** blank passwords.

> The share rights is Users = Full control.
> NTFS is: administrators = full, creator owner = full/subdirs,files,
> system
> = full and Users = RE
>
>