Scheduled tasks won't run unless logged in

Status
Not open for further replies.

Jordan

Distinguished
Apr 7, 2004
406
0
18,780
Archived from groups: microsoft.public.win2000.security (More info?)

I am having a problem where some scheduled tasks will run, however some will
not run. All use the same Administrator logon to run. It appears that
batch file tasks are the ones with the problem.

If I am logged on the console or even via a Terminal session as
Administrator, all the tasks run, but if I log off all the users, the
windows .exe type of commands run fine, but the batch file commands do not
run. As examples, my AV protection runs a program that checks for updates 4
times a day and my AV is always up to date, however I have a batch file that
calls a few "Net Stop" commands, then NTBackup.exe , and finally the "Net
Start" commands and this batch file and other batch files like it never run
unless I am logged in as the Administrator (or logged in with the console
locked)

Is there a reason why command line batch files are not running on my Windows
2003 Server unless I am logged in?
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.security (More info?)

In article <edw8YMftEHA.1404@TK2MSFTNGP11.phx.gbl>,
nojunk_allowed@nospam.com says...
> the console or even via a Terminal session as
> Administrator, all the tasks run, but if I log off all the users, the
> windows .exe type of commands run fine, but the batch file commands do not
> run. As examples, my AV protection runs a program that checks for updates 4
> times a day and my AV is always up to date, however I have a batch file that
> calls a few "Net Stop" commands, then NTBackup.exe , and finally the "Net
> Start" commands and this batch file and other batch files like it never run
> unless I am logged in as the Administrator (or logged in with the console
> locked)
>
> Is there a reason why command line batch files are not running on my Windows
> 2003 Server unless I am logged in?
>
Modify the permissions of CMD.exe in the windir\system32 folder to
assign the BATCH group the Read and the Read & Execute permissions. The
scheduled task is failing because it needs to spawn a command prompt.

Brian
 

Jordan

Distinguished
Apr 7, 2004
406
0
18,780
Archived from groups: microsoft.public.win2000.security (More info?)

That did not work. What else could be the problem?


"Brian Komar" <bkomar@nospam.identit.ca> wrote in message
news:MPG.1bdf0a75639628f989699@msnews.microsoft.com...
> In article <edw8YMftEHA.1404@TK2MSFTNGP11.phx.gbl>,
> nojunk_allowed@nospam.com says...
>> the console or even via a Terminal session as
>> Administrator, all the tasks run, but if I log off all the users, the
>> windows .exe type of commands run fine, but the batch file commands do
>> not
>> run. As examples, my AV protection runs a program that checks for
>> updates 4
>> times a day and my AV is always up to date, however I have a batch file
>> that
>> calls a few "Net Stop" commands, then NTBackup.exe , and finally the "Net
>> Start" commands and this batch file and other batch files like it never
>> run
>> unless I am logged in as the Administrator (or logged in with the console
>> locked)
>>
>> Is there a reason why command line batch files are not running on my
>> Windows
>> 2003 Server unless I am logged in?
>>
> Modify the permissions of CMD.exe in the windir\system32 folder to
> assign the BATCH group the Read and the Read & Execute permissions. The
> scheduled task is failing because it needs to spawn a command prompt.
>
> Brian
 

mlymanl

Distinguished
Apr 13, 2009
1
0
18,510
I'm also having this same issue and mapped drives are not the cause (as I'm trying to spawn a program on the local C drive).

Anyone else know what could be causing this and the fix?
 

bmelancon

Distinguished
Jul 6, 2009
1
0
18,510
I had similar problems. Adding "cmd.exe /c" seemed to do the trick like so:

cmd.exe /c "c:\full\path\to\batchfile.bat"
 

blahblah_05

Distinguished
Mar 5, 2010
1
0
18,510
If your trying to use a regualar user account without admin priviledges, mod'ng permissions on the cmd.exe file did the trick. Regular users do not have right to cmd.exe by defualt unless your logged on interactively.
 
Status
Not open for further replies.