A
alicorn2
Guest
I'm having "fun" today
Windows Server 2003 R2, Standard Edition, Service Pack 1
I have a scheduled task that I want to run a batch file hourly, as a
service, with no one logged in. I've simplified and simplified, so now I'm
down to bare bones using a different batch file that does next to nothing to
try to troubleshoot it.
The "test" batch file has this in it:
@echo off
echo %date% %time% Start of task, running as %UserName% >> c:\temp\test.log
REM this is where I was calling my real batch file, but I've even taken that
out now
echo %date% %time% End of task >> c:\temp\test.log
echo ------------------------- >> c:\temp\test.log
Scenarios:
Log in (via remote desktop) as myself. Run batch file by double-clicking
it. Success.
Log in (via remote desktop) as the service account I want to use. Run batch
file by double-clicking it. Success.
Log in (via remote desktop) as myself in one window and as the service
account in another remote desktop window. Run batch file by going into
scheduled tasks (under my ID) and doing right-click, run. (The task is set
to run as the service account.) Success.
Log off the second window, so I only have one connection, logged in as
myself OR let the scheduled task run on schedule with no one logged on. Task
fails with exit code 80.
The service account is a member of the local group Administrators. It has
been granted both "Log on as a batch job" and "Log on as a service" in
gpedit.msc / computer / windows / local policies / user rights.
Help! I'm going to go bald if I rip out much more of my hair!
Thanks,
Beverley
Windows Server 2003 R2, Standard Edition, Service Pack 1
I have a scheduled task that I want to run a batch file hourly, as a
service, with no one logged in. I've simplified and simplified, so now I'm
down to bare bones using a different batch file that does next to nothing to
try to troubleshoot it.
The "test" batch file has this in it:
@echo off
echo %date% %time% Start of task, running as %UserName% >> c:\temp\test.log
REM this is where I was calling my real batch file, but I've even taken that
out now
echo %date% %time% End of task >> c:\temp\test.log
echo ------------------------- >> c:\temp\test.log
Scenarios:
Log in (via remote desktop) as myself. Run batch file by double-clicking
it. Success.
Log in (via remote desktop) as the service account I want to use. Run batch
file by double-clicking it. Success.
Log in (via remote desktop) as myself in one window and as the service
account in another remote desktop window. Run batch file by going into
scheduled tasks (under my ID) and doing right-click, run. (The task is set
to run as the service account.) Success.
Log off the second window, so I only have one connection, logged in as
myself OR let the scheduled task run on schedule with no one logged on. Task
fails with exit code 80.
The service account is a member of the local group Administrators. It has
been granted both "Log on as a batch job" and "Log on as a service" in
gpedit.msc / computer / windows / local policies / user rights.
Help! I'm going to go bald if I rip out much more of my hair!
Thanks,
Beverley