Install Service

Copy pbniserv9.exe or pbniserv.exe and the PowerBuilder code files ( .pbl, .pbd or .dll ) into the installation directory. Open a command prompt at the installation directory and enter the following commands. In the following, pbniserv refers to pbniserv9 if you are using PB9. The .bat files that are installed contain examples of installing a service.

pbniserv -i servicename "displayname"

This command installs the service. The Startup Type is set to Manual.

The argument servicename is the name of the service. The name may not include spaces, forward slashes or back slashes. The maximum size of this argument is 256.

The argument displayname is what you will see in the SCM's Name column. This value must have double quotes around it if there are spaces. The maximum size of this argument is 256.

Both the servicename and displayname must be unique.

pbniserv -ia servicename "displayname"

This command installs the service just like -i does except the Startup Type is set to Automatic.

pbniserv -d servicename "description"

The argument description is what you will see in the SCM's Description column. This value must have double quotes around it if there are spaces. The maximum size of this argument is 1024.

pbniserv -v servicename pbvmname

The argument pbvmname is the PowerBuilder VM .dll filename for the version of PB the service is written in. If you are using PB9 and pbniserv9.exe, this option is not used. If you are using pbniserv.exe, the pbvmname would be pbvm100.dll for PB10 or pbvm105.dll for PB10.5.

pbniserv -l servicename pbliblist

The argument pbliblist is the library list for the service. This is a semi-colon-separated list of the PowerBuilder code files that make up the service. A code file may be a .pbl, .pbd or .dll. The maximum size of this argument is 2048. There is no limit to the number of files. Do not place a semi-colon after the last file name.

pbniserv -a servicename pbappname

The argument pbappname is the name of the application object in the PB code file. The maximum size of this argument is 50.

pbniserv -o servicename pbobjname

The argument pbobjname is the name of the user object in the PB code file. This object must be inherited from n_pbniserv. The maximum size of this argument is 50.

pbniserv -reg servicename regname regvalue

This command sets any value under the service's registry key. The argument regname is the registry value name. The argument regvalue is the value to be set. This value must have double quotes around it if there are spaces.