Home | Site Map | Cisco How ToNet How To | Wireless |Search | Forums | Services | Donations | Careers | About Us | Contact Us|

running batch files from task scheduler

Permissions, Group Policy, IPSec, Virus, Spam, Spyware, Malware.

running batch files from task scheduler

Postby guest » Sat Jan 26, 2008 9:17 pm

Situation: the batch file cannot be executed from the Task Scheduler as expected.
If I have misunderstood about your concern, feel free to let me know.

According to your description, we suspect that the issue is caused by the
security configuration. By default, the task will run under the security
context of the currently logged-on user. However, if the User Account
Control feature is enabled, the task will run under UAC with partial
privileges. As a result, the BAT file may not be executed as expected. To
do the troubleshooting, let's select the option "Run with highest
privileges" from the Properties window of the task to test the issue.

Let's refer to the steps below:

1. Check the "Run with highest privileges" option
-------------------------------
1). Click Start, type: "Schedule" (without quotation) in the Start Search
bar and then select "Task Scheduler" in the list.
2). Click Continue if it prompts.
3). Right click on the Task in question and then select Properties.
4). In the General tab, select "Run with highest privileges" and then click
OK.
5). Right click on the Task -> Click "Run" and then verify if the task is
able to run successfully.

If the issue persists, let's move on to the next steps:

2. Modify the BAT script
-------------------------------
I noticed that the BAT file you attached may have involved a third party
application (qa). Please understand that it may be difficult for us to test
or reproduce the problem when the third party application is involved. In
order to help you to isolate the problematic command-line which make the
whole BATCH abort, please refer to the following instructions to change the
script so that the command window will not be closed automatically:

1). Log on the machine as the Administrative account and then create a BAT
file which contains the following command lines. You can copy the following
contents directly.

################################## (Do not copy this line)
@echo Normal Log > log.log
@echo Error Log > logerr.log
@echo ============================
@echo Test Schedule...
@echo ============================

C:
F:
CD \apps\qa4
qa -m7

@echo ============================
@echo Finished.
@echo ============================
pause
exit
################################## (Do not copy this line)

2). Click Start, type: "Schedule" (without quotation) in the Start Search
bar and then select "Task Scheduler" in the list.
3). In the Action Panel, click "Create Basic Task"
4). Specify the Task Name =>Next =>Set the Schedule => Select "Start a
program"
5). Click Browse, select the bat file we just created and then click Next.
6). Check the option "Open the Properties dialog for this task when I click
Finish" -> Click Finish.
7). In the Properties window, please check the option "Run with highest
privileges" and then click OK.

Right click on the newly created task and then click Run.
Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com

Troubleshooting Vista Wireless
http://chicagotech.net/
guest
 
Posts: 9024
Joined: Mon Nov 27, 2006 1:10 pm

Return to Security

Your Ad Here

Who is online

Users browsing this forum: No registered users and 0 guests