Perforce Public Knowledge Base - P4Web as a Windows Service
× PRODUCTS SOLUTIONS CUSTOMERS LEARN SUPPORT
Downloads Blog Company Integrations Careers Contact Try Free
Menu Search
Perforce
Reset Search
 

 

Article

P4Web as a Windows Service

« Go Back

Information

 
Problem

How do I install and configure P4Web as a Windows Service?

Solution

Prior to the 2004.2 P4Web release, running P4Web as a service was not directly supported.

With the 2004.2 release, P4Web installed as a service but only one P4Web service was allowed per machine. The service name was "Perforce Web" and the service executable name was p4webs.exe. P4Web looked for the executable name p4webs.exe, regardless of case, to operate in service mode.

As of the  2005.1 release there is no longer a one service per machine limit.

The process of setting up P4Web as a service is similar to that of configuring a new Perforce Server service. The service utility, svcinst.exe, should be used to set up the service and is distributed with the P4Web installer. The utility can be found within the Perforce root directory after running the installer.

  1. Copy the P4Web.exe executable to P4Webs.exe
  2. Use the svcinst utility to create the P4Web Windows service:
    svcinst create -n "Perforce Web" -e "c:\Program Files\Perforce\P4Webs.exe" -a
    
    
  3. Configure the Perforce Web service using the p4 set command with the -S flag:
    p4 set -S "Perforce Web" P4PORT=1666
    p4 set -S "Perforce Web" P4WEBPORT=8080
    p4 set -S "Perforce Web" P4USER=perforceuser
    
    
  4. Start the Perforce Web service:
    svcinst start -n "Perforce Web"
    
    
    

Setting P4Web Options

In the 2006.2 release additional options were added to change P4Web behavior and to tighten or loosen security restriction while in multi-user (-M) mode. The P4WEBSERVICEFLAGS registry variable allows you to pass any of these additional P4Web flags.

For example, if you wanted to set P4Web to use multi-user mode, register it as a zero-conf service, set the zero-conf name and set the zero-conf description you would enter:

p4 set -S "Perforce Web" P4WEBSERVICEFLAGS="-M -0 -In \"Perforce Web Client\" -Id \"For remote access\""

Note: Escape arguments that require quoted strings with a backslash (\").


Once you have set or changed the P4WEBSERVICEFLAGS variable the "Perforce Web" service must be restarted for the changes to take effect.

Related Links

Feedback

 

Was this article helpful?


   

Feedback

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

Characters Remaining: 255