My suggestion is to create a service account that will never log on
interactively to the workstation. Have that account's credentials execute
the batch file. 

 

 

 

Chris Bodnar, MCSE
Sr. Systems Engineer
Distributed Systems Service Delivery - Intel Services
Guardian Life Insurance Company of America
Email: [email protected]
Phone: 610-807-6459
Fax: 610-807-6003

  _____  

From: [email protected] [mailto:[email protected]] 
Sent: Friday, August 07, 2009 2:21 PM
To: NT System Admin Issues
Subject: Scheduled Tasks/Batch logons, etc

 

OK - here's the scenario. Windows XP, SP2 workstaions joined to a domain..
User has several scheduled tasks that run every 5 minutes.  The tasks
basically just run a batch file that looks for a specific file in a
direcory. If it finds it, it runs another batch file that performs a few
other misc. checks and then actually calls an executable to process these
large data sets.

 

This is all basically to allow the user to have these data processing runs
happen automatically, no matter who has the workstation locked, etc.. all
he has to do is drop data in a specific folder and create one file over
the network and within the next 5 minutes, it starts up.

 

After working out a few GPO issues that were kicking the users out of the
"Log on as batch job" user right, the jobs run fine.  The problem now, is
that if the owner of the job (whoever's credentials it's running under) is
logged in when the job kicks off, the processes that were started by the
scheduled task are killed.  This doesn't happen if the owner of the job is
not logged on, or any other user is logged on, of course.  My assumption
is that only the initial batch file called by the scheduled task is run
under the batch login type, so if the scheduled task was directly calling
the executable then it would stay running, but since this the job is
runnig a batch file that is calling another batch file, which in turn is
actually calling the executable, the exe doesn't run under the batch type
login and is killed just like every other user proccess when he logs off.

 

I looked at a few shell commands to see if there was any specific way to
call the 2nd batch file, or executable, that would run it under the same
logon that the original batch file was run under but didn't hae any luck.
I also googled a bit, but could only find an Expert's Exchange question
(that sounded exactly like my problem) but of course I'm not signing up
and paying any cash for it.

 

Any thoughts, suggestions, flames?  Also, if there is a better way to
accomplish this, I wouldn't mind hearing it.   Thanks in advance..

 

-cb

 

 

 



-----------------------------------------
This message, and any attachments to it, may contain information
that is privileged, confidential, and exempt from disclosure under
applicable law.  If the reader of this message is not the intended
recipient, you are notified that any use, dissemination,
distribution, copying, or communication of this message is strictly
prohibited.  If you have received this message in error, please
notify the sender immediately by return e-mail and delete the
message and any attachments.  Thank you.
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to