S
Stefano Gatto
An user-account on our Windows 2000 server is configured without the right
to logon interactively. The only way batch files can be executed on its
behalf is through the Windows Scheduler.
The problem we have is with those batch files that need to launch new
processes. Actually all lines are executed except those that launch new
processes. See exemple below. Lines that launch new processes are ignored or
fail.
Does anyone know what particular right we should grant to that
non-interactive user, so that batch files launched in its name can spawn new
processes? Thanks a lot.
Exemple: this batch file is launched by Windows Scheduler on behalf on this
user. All lines are executed properly except the one opening a new process:
"cmd /c dir > log.txt". This line fails from executing, maybe because it
needs a new process to be created to host cmd.
echo Batch file starts on %date% - %time% > log.txt
echo This batch file starts a new process now: > log.txt
cmd /c dir > log.txt
echo This batch file is finished > log.txt
C:\>type log.txt
Batch file starts on 12-mar-2004 - 9:09:13
This batch file starts a new process now:
This batch file is finished
C:\>
As you may notice, the result of "dir" is not traced in the log, so I
imagine it has not been executed. Does someone has an idea why?
I hope my explanations are clear enough otherwise please ask details. Thanks
Stefano
to logon interactively. The only way batch files can be executed on its
behalf is through the Windows Scheduler.
The problem we have is with those batch files that need to launch new
processes. Actually all lines are executed except those that launch new
processes. See exemple below. Lines that launch new processes are ignored or
fail.
Does anyone know what particular right we should grant to that
non-interactive user, so that batch files launched in its name can spawn new
processes? Thanks a lot.
Exemple: this batch file is launched by Windows Scheduler on behalf on this
user. All lines are executed properly except the one opening a new process:
"cmd /c dir > log.txt". This line fails from executing, maybe because it
needs a new process to be created to host cmd.
echo Batch file starts on %date% - %time% > log.txt
echo This batch file starts a new process now: > log.txt
cmd /c dir > log.txt
echo This batch file is finished > log.txt
C:\>type log.txt
Batch file starts on 12-mar-2004 - 9:09:13
This batch file starts a new process now:
This batch file is finished
C:\>
As you may notice, the result of "dir" is not traced in the log, so I
imagine it has not been executed. Does someone has an idea why?
I hope my explanations are clear enough otherwise please ask details. Thanks
Stefano