MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: MsiSync.VBS[Next]: GPRESULT.EXE
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Tips and Tricks->Tools->JT.EXE

JT.EXE

This is a free tool from Microsoft which is believe available in both NT and WIN2000 resource kits. Windows XP has yet another tool which comes with the operating system called "SCHTASKS.EXE" (Microsoft never seem to get anything right...)!

This tool is used to set up job/task schedules in the Windows NT, 2000 and XP scheduling GUI (from the command line). WinNT seems to generate weird "permission denied" errors on longer command lines (about 500 chars?) so it is advisable to use the "@ file" mechanism to shorten it.

The "Schedule" command requires this tool (or "SCHTASKS.EXE") to be available at install time (you can install it along with your package if required). You can download it from microsoft's site (ftp://ftp.microsoft.com/reskit/win2000/jt.zipThis external link was OK when tested at 28 Aug 2008).

There is no documentation so you may wish to see the macro sample, also note that you can get help by typing "JT.EXE /?" or "JT.EXE /? LJ" etc. An easy way to get a list of task attributes is "JT.EXE /pj" (some of these don't work - probably JT.EXE bug).

The following is an example of the command I used when trying to work out the required syntax to set a trigger up the way I wanted it:

ms_jt /CTJ Type = WEEKLY TypeArguments=1,.M.W.F. /ptj

Note that in a lot of ways this tool is "brain dead" so you will have trouble at times getting it to work (for example I have not figured out how a double quoted parameter can contain double quotes, I suspect it can't). It would be too useful if it could dump a schedule in the same format it takes it which is why Microsoft decided not to include the feature...

Debugging Creation Problems

Check the NAKEMSI (or Windows Installer) log for the full "JT.EXE" command, you should be able to run this command if you have left the install error message displayed (haven't rolled back yet).

The log or the commands console output will display some possibly useful but generally cryptic information (the "JT.EXE" output).

You always seem to get a message "[ERROR] Expected job property name but found token 'Interactive'", it does appear to work though...

It will say "Created trigger x" before it has done so (that is it should be "creating trigger"). It probably failed because of inconsistent values in the trigger. Try creating a very simple trigger following the failing one to be sure.

My "favourite" way of stuffing things up is to supply a smaller value for "MinutesDuration" than I supply for "MinutesInterval"... The "/SJ" switch seems to fail (or at least it says so and returns a non-zero return code) if the job already exists, I always delete any existing job first.

Using appropriate command line options you can load and existing job and display its values. This is a good way of working out what some of the values will be however, from memory it is not always correct (different keywords!).

JT.EXE /?

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /CTJ

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /DTJ

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /GC

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /GM

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /LJ

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /PJ

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /PRJ

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /PSJ

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /PTJ

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /RJ

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /SAC

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /SAJ

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /SC

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /SD

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /SE

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /SJ

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /SM

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /SNJ

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /STJ

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.

JT.EXE /? /SVJ

'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006 & 2007 for the Windows SDK (Windows Installer) area.This external link was OK when tested at 9 Sep 2008Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: MsiSync.VBS[Next]: GPRESULT.EXE


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Saturday September 13 2008 at 2:32pm
Visit MAKEMSI's Home PageThis external link was OK when tested at 28 Aug 2008

HTML page dated Mon, 29 Jan 2007 00:11:11 GMT
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006 & 2007 for the Windows SDK (Windows Installer) area.This external link was OK when tested at 9 Sep 2008