Perforce Public Knowledge Base - Automated Deployment of Perforce
Downloads Blog Company Integrations Careers Contact Try Free
Menu Search
Reset Search



Automated Deployment of Perforce

« Go Back



How do I automate deployment of Helix client programs at large Windows sites?


For releases 2007.3 and later, Helix client installers use command line options passed to the installer executable. The command line options are used to:

  • Specify property values used during the installation.
  • Instruct the installer to generate a log file.
  • Specify the desired user interface level.
  • Specify which features are installed or removed.
In this article, the example commands refer to the Helix Visual Client installers: p4vinst.exe and p4vinst64.exe.

Specifying property values

Automated installations are customized by calling the installer with a /v" " flag. All configuration properties are placed between the double quotes. Any property values that contain spaces should be surrounded by escaped double quotes (\"):

p4vinst64.exe /v"additional_flags property_name=property_value"

A complete list of property values can be found in the Automated Deployment Properties Knowledge Base article.

Generating a log file

By default a log file is generated in the user's Temp folder. To produce an installer log file containing verbose output in the same location as the installer, use the '/l' flag (lower case L):

p4vinst.exe /v"/l*v+ p4vinst.log"

In this example the '*v' option sets verbose logging and the '+' appends to the specified log file instead of over-writing it.

To produce an installer log file containing verbose output in a path with spaces in a folder name:

p4vinst64.exe /v"/l*v \"c:\My log folder\p4v.log\""

You must use a backslash (\) before each quote that encloses the path name containing spaces.

For more information about logging options see the Microsoft Msiexec command-line options page.

Specifying the desired user interface level

The /q flags are used to control the user interface level. The following are some of the available flags:

  • /qn - Silent, no user interface.
  • /qb - Basic user interface.
  • /qr - Reduced user interface.
  • /qf - Full UI (default).

First, run the following command from the command line to ensure the installer is working. This command will run the P4V installer with a basic user interface and show progress only:

p4vinst.exe /v"/qb"

Even with the /qn flag a small initialization dialog will appear. To hide this dialog and perform a completely silent installation, add the /s flag before the /v flag:

p4vinst64.exe /s /v"/qn"

Note: Use an Administrator Command Prompt to install silently. Otherwise Windows may show a User Account Control dialog asking for permission to run the installer.

This example will install silently (no UI) and return to the command prompt when done ("start /wait" returns to the command prompt when the installer is done):

start /wait p4vinst.exe /v"/qn"

For more information about user interface options see the Microsoft Msiexec command-line options page.

Specifying which features are installed or removed

You can pass properties to specify which features are installed or removed. The syntax for specifying features is as follows:

ADDLOCAL=<feature>,<feature> {or ALL}
A comma delimited list of features to install, or ALL to indicate all features are to be installed.
REMOVE=<feature>,<feature> {or ALL}
A comma delimited list of features to not install or remove (if installed), or ALL to indicate all features are to be uninstalled.
    Install all features except P4Admin:
    p4vinst64.exe /v"ADDLOCAL=ALL REMOVE=P4ADMIN"

    Install P4V only and do it silently:
    p4vinst.exe /v"/qn ADDLOCAL=P4V,QT"

    Quotes are required after "/v" since a space is needed before the ADDLOCAL property setting. QT is a hidden feature that P4V, P4ADMIN, and P4MERGE require.

    Install silently to a non-default folder:
    start /wait p4vinst64.exe /v"/qn INSTDIR=C:\MyFolder"
    If the path contains spaces you must quote the path and escape the quotes with backslash before each quote.
    start /wait p4vinst.exe /v"/qn INSTDIR=\"C:\Program Files\Test\""

    Uninstall P4Admin silently:
    p4vinst64.exe /v"/qn REMOVE=P4ADMIN"

    Uninstall all features:
    p4vinst.exe /x

    p4vinst.exe /v"REMOVE=ALL"

    Uninstall all features silently (no UI) and return to the command prompt when done:
    start /wait p4vinst.exe /x /v"/qn"
    The valid feature names for the P4V installers are:
    • P4V, P4MERGE, P4ADMIN, P4, QT
    QT is a hidden feature that P4V, P4ADMIN, and P4MERGE require.

    Some installations may require a reboot upon completion. To prevent this reboot prompt set the REBOOT property as follows:

    p4vinst64.exe /v"REBOOT=ReallySuppress"

    The 2017.3 installer adds a /ignore parameter, which ignores a particular error. If another installer is running, even if it's not a P4V installer, our 2017.3 installer will display an error:

    Another installation is already in progress. Complete that installation before proceeding with this install.

    If you want to ignore this error, for example if the error message is incorrect and there is not another installation in progress, you can use /ignore.

    Due to issues with the Helix plug-in for Windows Explorer (P4EXP) we removed the plug-in from the P4V installers. Users can download a standalone P4EXP installer for 32-bit Windows or 64-bit Windows from the Perforce FTP site.

    P4V global settings

    The 2013.1 Helix Versioning Engine allows the storing of settings in the database with the p4 property command. The Helix Visual Client allows many of its features to be enabled/disabled by 'p4 property' values, which eliminates the need to do so at install time. The following Knowledge Base articles explain more:

    Storing Property Settings in Perforce

    P4V Global Settings, Part 1

    P4V Global Settings, Part 2


    Related Links



    Was this article helpful?



    Please tell us how we can make this article more useful.

    Characters Remaining: 255