Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista General

Vista - maximum command length in Windows Scheduler

Reply
 
Old 08-02-2007   #1 (permalink)
rpremuz@yahoo.com


 
 

maximum command length in Windows Scheduler

Hello,

I have a question for a MS MVP.

What is the maximum length of a command that you can put in a Windows
scheduled task (its run field)?

E.g. http://support.microsoft.com/kb/830473/en-us
gives command-line string limitations for various versions of MS
Windows but does not tell anything about the Windows Scheduler.

-- rpr. /Robert Premuz/


My System SpecsSystem Spec
Old 08-02-2007   #2 (permalink)
Gary S. Terhune


 
 

Re: maximum command length in Windows Scheduler

Can't say with absolute certainty, but as that article has the same figures
for all the examples -- "...either 2047 or 8191 characters (as appropriate
to your operating system)" -- I would assume those figures also apply to a
command for Scheduled Tasks. Only other figure I could imagine would be 255
or 256 characters, but I just created a scheduled task with a command 270
characters long and it ran just fine.

--
Gary S. Terhune
MS-MVP Shell/User
www.grystmill.com

<rpremuz@yahoo.com> wrote in message
news:1186073100.208242.293010@x35g2000prf.googlegroups.com...
> Hello,
>
> I have a question for a MS MVP.
>
> What is the maximum length of a command that you can put in a Windows
> scheduled task (its run field)?
>
> E.g. http://support.microsoft.com/kb/830473/en-us
> gives command-line string limitations for various versions of MS
> Windows but does not tell anything about the Windows Scheduler.
>
> -- rpr. /Robert Premuz/
>



My System SpecsSystem Spec
Old 08-02-2007   #3 (permalink)
Pegasus \(MVP\)


 
 

Re: maximum command length in Windows Scheduler


<rpremuz@yahoo.com> wrote in message
news:1186073100.208242.293010@x35g2000prf.googlegroups.com...
> Hello,
>
> I have a question for a MS MVP.
>
> What is the maximum length of a command that you can put in a Windows
> scheduled task (its run field)?
>
> E.g. http://support.microsoft.com/kb/830473/en-us
> gives command-line string limitations for various versions of MS
> Windows but does not tell anything about the Windows Scheduler.
>
> -- rpr. /Robert Premuz/
>


What would be the point of having a command line that exceeds
a few hundred characters? It would be totally unmanageable! If
you really want to find out then you can do so quite easily, by
scheduling this command to run:

cmd /c echo 1234567890x

Now double the numerical string time and again and check
how long it takes until the trailing "x" disappears. The test may
be tedious (and IMHO futile) but it will give you an authoritative
answer.


My System SpecsSystem Spec
Old 08-03-2007   #4 (permalink)
Chuck


 
 

Re: maximum command length in Windows Scheduler

Somewhere in the past, along with the long file and folder names, the buffer
for command lines got larger.
Long folder names several layers deep plus a long file name or two can
easily fill a very large command line buffer.

"What would be the point of having a command line that exceeds
a few hundred characters? It would be totally unmanageable! If
you really want to find out then you can do so quite easily, by
scheduling this command to run:"

"Pegasus (MVP)" <I.can@fly.com> wrote in message
news:OQslp6T1HHA.5360@TK2MSFTNGP03.phx.gbl...
>
> <rpremuz@yahoo.com> wrote in message
> news:1186073100.208242.293010@x35g2000prf.googlegroups.com...
> > Hello,
> >
> > I have a question for a MS MVP.
> >
> > What is the maximum length of a command that you can put in a Windows
> > scheduled task (its run field)?
> >
> > E.g. http://support.microsoft.com/kb/830473/en-us
> > gives command-line string limitations for various versions of MS
> > Windows but does not tell anything about the Windows Scheduler.
> >
> > -- rpr. /Robert Premuz/
> >

>
> What would be the point of having a command line that exceeds
> a few hundred characters? It would be totally unmanageable! If
> you really want to find out then you can do so quite easily, by
> scheduling this command to run:
>
> cmd /c echo 1234567890x
>
> Now double the numerical string time and again and check
> how long it takes until the trailing "x" disappears. The test may
> be tedious (and IMHO futile) but it will give you an authoritative
> answer.
>
>



My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Which is the maximum length for HDMI cable? Graphic cards
Launch command window from task scheduler Vista General
Task Scheduler - command <schtasks /query /fo csv /nh> does not wo Vista General
command line maximum number of characters Vista General
Task Scheduler Command Line XML Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46