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

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

Cancel or Abort?

A colleague of mine raised an interesting question regarding our installation – what’s the difference between ‘Cancel’ (e.g. in ok/cancel message) and ‘Abort’ (e.g. in an ‘abort/retry/ignore’ message)?
Turns out that there is a logic behind this, one I was using without thinking about:

  • ‘Abort’ means to stop the process since an error occurred (e.g. inadequate disk space, missing prerequisites, problem registering a DLL etc.)
  • ‘Cancel’ means to stop the process since the user wants to (e.g. in the user interview dialogs, during file copying, etc.).

I wonder how many people actually distinguish between these two…