Skip to content

ERROR: Value for ‘/TR’ option cannot be more than 261 character(s).

June 22, 2014

One would expect that, in the year of 2014, such errors would be a thing of the past…
But it’s true. You cannot create/update a scheduled tasks from command-line (using SCHTASKS) if the command line it runs is longer than 261 characters.
The funny thing is that you *can* create such a task using the GUI. So why the command-line limitation?

So, how to work around it?
option 1 – create a batch file to run the full command, and set the schedule tasks to execute that batch file. In most scenarios this is the easiest solution
option 2 – use a 3rd party utility for handling scheduled tasks (there are several, including jt.exe from Microsoft’s Windows 2000 SDK)

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: