A scheduled task does not run as expected if a command-line argument is enclosed in quotation marks on a computer that is running Windows Server 2008 or Windows Vista SP1

A scheduled task does not run as expected if a command-line argument is enclosed in quotation marks on a computer that is running Windows Server 2008 or Windows Vista SP1

Article ID : 951246
Last Review : May 9, 2008
Revision : 1.0

SYMPTOMS

Consider the following scenario:

• You create a scheduled task on a computer that is running Windows Server 2008 or Windows Vista Service Pack 1 (SP1).
• One or more command-line arguments in this scheduled task are enclosed in quotation marks.

In this scenario, the scheduled task does not run as expected. Additionally, a value of 0x1 appears in the Last Run Result column.

For example, assume that you create a scheduled task by running the following command-line argument:

schtasks /create /tn Test Scheduled Task /tr c: temp.bat 1-Jan-70 8:00:00 /sc daily /st 03:15:00 /ru System

The scheduled task fails after it starts at 03:15. However, if you delete the quotation marks around 1-Jan-70 8:00:00, the scheduled task runs successfully.

Note The issue does not occur in Windows Vista or in Windows Server 2003.

Back to the top

CAUSE

This problem occurs because Task Scheduler cannot correctly parse quotation marks in a command line.

Back to the top

RESOLUTION

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support (http://support.microsoft.com/contactus/?ws=support)

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

To apply this hotfix, you must be running Windows Server 2008 or Windows Vista SP1.

Restart requirement

You must restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

Windows Server 2008 x86
File name File version File size Date Time Platform
Taskeng.exe 6.0.6001.22153 169,984 09-Apr-2008 01:55 x86
Taskeng.mof Not Applicable 2,254 18-Dec-2007 21:21 Not Applicable
Windows Server 2008 IA-64
File name File version File size Date Time Platform
Taskeng.exe 6.0.6001.22153 518,656 09-Apr-2008 02:07 IA-64
Taskeng.mof Not Applicable 2,254 18-Dec-2007 21:22 Not Applicable
Windows Server 2008 x64
File name File version File size Date Time Platform
Taskeng.exe 6.0.6001.22153 265,216 09-Apr-2008 02:22 x64
Taskeng.mof Not Applicable 2,254 18-Dec-2007 21:21 Not Applicable
Windows Vista Service Pack 1 x86
File name File version File size Date Time Platform
Taskeng.exe 6.0.6001.22153 169,984 09-Apr-2008 01:55 x86
Taskeng.mof Not Applicable 2,254 18-Dec-2007 21:21 Not Applicable
Windows Vista Service Pack 1 IA-64
File name File version File size Date Time Platform
Taskeng.exe 6.0.6001.22153 518,656 09-Apr-2008 02:07 IA-64
Taskeng.mof Not Applicable 2,254 18-Dec-2007 21:22 Not Applicable
Windows Vista Service Pack 1 x64
File name File version File size Date Time Platform
Taskeng.exe 6.0.6001.22153 265,216 09-Apr-2008 02:22 x64
Taskeng.mof Not Applicable 2,254 18-Dec-2007 21:21 Not Applicable

Back to the top

WORKAROUND

To work around this problem, manually delete the quotation marks from the Add arguments section of the properties for the scheduled task.

Back to the top

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the Applies to section.

Back to the top

MORE INFORMATION

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

824684 (/Feedback.aspx?kbNumber=824684/) Description of the standard terminology that is used to describe Microsoft software updates

Back to the top


APPLIES TO
• Windows Server 2008 Standard
• Windows Server 2008 Enterprise
• Windows Server 2008 Datacenter
• Windows Server 2008 for Itanium-Based Systems
• Windows Server 2008 Standard without Hyper-V
• Windows Server 2008 Enterprise without Hyper-V
• Windows Server 2008 Datacenter without Hyper-V
• Windows Vista Service Pack 1, when used with:
    Windows Vista Home Basic
    Windows Vista Home Premium
    Windows Vista Business
    Windows Vista Enterprise
    Windows Vista Ultimate
    Windows Vista Home Basic 64-bit Edition
    Windows Vista Home Premium 64-bit Edition
    Windows Vista Enterprise 64-bit Edition
    Windows Vista Ultimate 64-bit Edition

Back to the top

Keywords: 
kbexpertiseinter kbpubtypekc kbqfe kbhotfixserver KB951246

Back to the top

 

Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
Microsoft Corporation. All rights reserved. Terms of Use | Trademarks


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image