Publish from the command line


Publishing from the command line allows you to automatically publish one or more books in a batch or as part of a scripted or scheduled process. Author-it creates the command line parameters for you so you don't need to look up the correct syntax.

Note: To publish from the command line, you must enable local user plugins.

  • Enable local user plugins

  1. In Author-it Administrator, go to Settings > Plugin Settings.

  2. Select Enable local user plugins.

  3. Select a Plugin folder.

    Note: If you don't normally use plugins, you can select any folder, including an empty one.

  • Publish from the command line

  1. From Publishing console, select the profile and books you want to publish.

  2. Click the Show Command Line button


    From the shortcut menu, click Show Command Line.

    A window appears displaying the command-line parameters based on your selections.

  3. Copy and paste the parameters as required.

Best Practice: Creating syntax for books and variants

When using the command line to publish, you can define the syntax to include multiple books. If you are adding variant criteria to the command line, create the syntax so it refers to a single book. Publish multiple book by running them in a batch file.

Syntax examples

  • Multiple books:

    Authorit[.exe] libraryname [ /user /pwd ] [ /pub book|profile;book|profile... ] (/returncode)

  • Single book with variants:

    Authorit[.exe] libraryname [ /user /pwd ] [ /pub book|profile ] [ /variant name|value;name|value... ] (/returncode)

  • Assigning variables via the command line to publish a book that has prompt on publish variables in it, and specify the variable assignments via the same command:

    /variant “variable1|variable1value; variable2|variable2value"

The parts of the command line switch syntax are:




The path to the Author-it program.


The type, name and path of your Author-it Library. Author-it will open this library when found.

For example:

/jet"C:\Program Files\Author-it\Data\Libraries\Acme.adl"



If not using trusted connections, you also need to pass the SQL parameters:

/sql"Acme|server1|False|login id|password"


User account to sign into the Author-it Library database.


Password used to sign into the Author-it Library database.


Tells Author-it to publish documentation in the specified library using the book and output list.


The ObjectID of the book you want to publish in the library.


The ObjectID of the publishing profile you want to publish to.


Causes the publisher to return a "return code", as follows:


if publishing was successful


if an error or warning occurred during publishing (including the cancel button being selected)

This allows automatic publishing to be used in a batch file and the success or failure can be used to branch in a batch file. For example:


@echo off

echo Starting Publisher - Book 825 to Publishing Profile 1077

"C:\Program Files\Author-it\Authorit.exe" /jet"C:\Program Files\Author-it\Data\Libraries\Acme.adl" /pub"825|1077" /returncode


echo Publishing has worked



echo Publishing has failed


Note: The "return code" is automatically used, whether the parameter is added to the command line or not.


Tells Author-it to publish a specified variation of the the book. When multiple criteria are used, the variant information is separated with a semi colon. For example, /variant"Product|X2001;Country|USA"

variant name

Criteria label applied to the variant object. For example, "Product".

variant value

Specific value applied to the variant object. For example, X2001.

Note: When used, these arguments must be in a command line to run the Author-it Publisher. The statement must all be on the same line.


An example of a valid command prompt that runs Author-it, loads a specific JET library, publishes a book with the object code of 825 using the publishing profile with the object code of 1077 may look like:

"C:\Program Files\Author-it\Authorit.exe"/jet"C:\Program
Files\Author-it\Data\Libraries\Acme.adl" /pub"825|1077"