PowerClient C/S applications

PowerBuilder 2019 R3 introduces a new deployment method called PowerClient to enable the automatic on-premise deployment of the PowerBuilder client/server applications. With PowerClient, the developer no longer needs to create an installation program, or to manually install and update the PowerBuilder application to each client machine. For more details about PowerClient, refer to this whitepaper: Automating On-Premise Deployment of PowerBuilder Apps.


You must have a Professional or CloudPro license to use the PowerClient deployment feature.

To create a PowerClient C/S application project:

  1. Select File>New or click the New button in the PowerBar to open the New dialog box.

  2. On the Project tab, select the PowerClient C/S App project type and click OK.

    The Project painter for the PowerClient application opens so that you can specify the following properties of your application:

    • The name of the PowerClient application, the deployment mode (full or incremental), and the platform (32-bit or 64-bit)

    • The Web server (local or remote) where files will be deployed

    • The external files such as INI file, DLL/OCX files, XML files etc.

    • The resource files such as images etc.

    • The runtime version and runtime files

    • The preload command prompts

    See the table below for more instructions.

    Manifest files are unsupported in this beta version and may be supported in the GA version.

  3. When you have finished defining the project object, save the object by selecting File>Save from the menu bar. PowerBuilder saves the project as an independent object in the specified library. Like other objects, projects are displayed in the System Tree and the Library painter.

To deploy a PowerClient C/S application project:

  1. Before deploying the application, make sure to close any anti-virus tool on the development machine.

  2. Right-click the PowerClient C/S application project in the System Tree and then select Deploy PowerClient C/S App to compile and deploy the application to the Web server.

    The PowerClient app executable file (and an XML file with the same name) will be generated under the same folder as the PowerBuilder target (PBT) file.

    If you want to digitally sign the PowerClient app executable file, you can place the signing commands in a file, name the file as appsign.cmd, and place this file in the same folder as the PowerClient app executable. PowerBuilder will sign the executable file for you by executing the commands in appsign.cmd immediately after the executable file is generated and before it is deployed to the server. For example, to sign the application executable file using Microsoft’s SignTool, you may write commands like this:

    signtool.exe sign /f mycert.pfx /p password /d "My application" /du http://www.mytest.com /fd sha256 /tr "http://timestamp.digicert.com" /td sha256 mytest.exe


    If you intend to deploy to a local Web server, make sure you run PowerBuilder as administrator (administrator rights are required when transferring files to a local Web server).

To run a PowerClient C/S application:

  1. (For administrator) Run PowerBuilder Installer to install PowerClient App Publisher to the home directory of the Web server (for example, %systemdrive%\inetpub\wwwroot).

    PowerClient App Publisher provides the application publishing services for the PowerClient application, including:

    • PowerClient App Setup program for installing 1) PowerClient Launcher for running PowerClient applications and 2) PowerClient Service for supporting multiple Windows users

    • PowerClient App Shell Setup program for installing PowerClient App Shell

    • The latest PowerBuilder Runtime files

  2. (For end users) Choose to run the PowerClient application with or without a background process.

    • To run the PowerClient application using a background process, input http://[hostname]/[appname] in a Web browser.

      This will install the application through the Web browser for the first time. After that, users can directly double click the application icon on the desktop to run the PowerClient C/S application.

      After the PowerClient application is downloaded and installed successfully, the PowerClient App Setup program will be running to install PowerClient Launcher (PBAppLauncher.exe) and PowerClient Service (PBAppService.exe); they will be installed and started as the Windows background process, to support the running of the PowerClient application.

      Although PowerClient Launcher and PowerClient Service can be set up to support multiple Windows users during the installation process, it requires administrator rights to install successfully for the first time. And if there are multiple Windows users running the PowerClient application on the same machine, make sure all of them select Yes (when asked whether multiple Windows users will be running the PowerClient app on the computer) when installing PowerClient Launcher and PowerClient Service, otherwise error would occur at runtime.

    • To run the PowerClient application without using any background process, input http://[hostname]/[appname]/apprunner.html in a Web browser.

      There will be no application startup icon installed on the desktop; users will need to start the application from the Web browser all the time.

      After the PowerClient application is downloaded successfully, users will be prompted to install PowerClient App Shell (PBAppShell.exe) and then PowerClient App Shell will be launched by the Web browser to start the PowerClient application. PowerClient App Shell is registered as an application protocol in the Windows Registry; it can be launched by a Web browser by any user without requiring administrator rights, but almost all browsers (except Safari) will prompt the users before launching the program (PBAppShell.exe); the program has dependency on the Web browser but no dependency on any background process or service.


    If users are accessing a local address (such as localhost), make sure to turn off the proxy server or add the address to the proxy exception list, otherwise the following error may occur: "Detect PB Runtime upgrade failed! Error code: 3001" when users launch the PowerClient application.


    Every time when the PowerClient C/S application launches, it needs to connect with the Web server to check updates, therefore, please make sure Web server is running and can be connected all the time.

  3. If the PowerClient application needs to use command line arguments, input the application URL with the command line arguments in the Web browser. The URL with the command line arguments will be automatically saved and updated to the application startup icon on the desktop.

    The format of an URL with arguments is: http://[hostname]/[appname]?[ArgValue] or http://[hostname]/[appname]/apprunner.html?[ArgValue]. [ArgValue] indicates the arguments that will be passed to the application. The arguments must be separated by commas if there are more than one argument.

To package a PowerClient C/S application:

  • This feature will be supported in the GA release.

PowerClient C/S App project options

The following table describes each of the options you can specify in the Project painter for the PowerClient C/S application.


What you specify

App Name

Specify a name for the PowerClient application.

Deploy Mode

Specify either Full or Incremental to indicate whether you want PowerClient to deploy all object files to the Web server. If you choose Incremental, PowerClient deploy only files that have changed, and files that reference any files that have changed, since the last time you deployed the application.

You can only select Full mode at this moment.


Select if the PowerClient application can run on 32-bit or 64-bit machines.

Note: 64-bit platform will be supported in the GA release.

Local Server or Remote Server

Configure a local or remote Web server where files will be deployed. IIS, Apache and Nginx are supported.

For a local Web server, specify the home directory of the Web server, for example, for IIS, the home directory is %systemdrive%\inetpub\wwwroot.

For a remote Web server, specify the FTP connection settings (such as host name, port number, user name, password) for the Web server. For how to configure FTP on the Web server, refer to Two requirements for FTP settings.

External Files

Specify the custom user external files, including:

  • Visual Studio 2010 runtime files (atl100.dll, msvcp100.dll, and msvcr100.dll)

    Note: You will need to manually copy these files to the same folder as the PowerBuilder target (PBT) file, and then select them in External Files for deployment.

  • INI files (including pb.ini, pblab.ini, pbodb.ini etc.)

  • DLL/OCX files

  • XML files or image files used by the UI theme or external functions

  • text files, PDF files or any other files used by the external function

External files will be downloaded from the server before the application starts. The files can be downloaded as one compressed package (thus faster) or as individual files.

  • To download files as one compressed package (thus faster), you should deploy the files as a package to the server (by selecting Packages from the list box, then clicking Create Package to create a package, and then adding the folder or files under this package).

  • To download files as individual files, you deploy the files individually to the server (by selecting Files from the list box, and then adding the folder or files under it).

If the DLL/OCX files need to be registered and can be registered by Regsrv32, you can click DLL & OCX Registration to select the DLL/OCX files so that they can be registered by Regsrv32 automatically before the application starts; if the DLL/OCX files need to be registered but cannot be registered by Regsrv32, you can specify the registration commands in Preload Event.

Resource Files

Specify the image files that are referenced in the PowerScript.

Resource files are downloaded from the server at the moment when they are used.

You can add the folder that contains the file, or add files individually.


Select the version and files of the PowerBuilder Runtime that will be used by the PowerClient application.

You will need to install the corresponding version of PowerClient App Publisher to the Web server; PowerClient App Publisher contains the PowerBuilder Runtime files.

Preload Event

(Optional) Specify the commands that will be executed immediately after files are downloaded and before the application starts. For example, you can specify commands to register DLL/OCX files that cannot be registered by Regsrv32; or any commands that need to be executed with administrator rights.

The commands can be any Windows commands or user-defined commands.

For example, suppose there is a DLL file from the application that needs to be registered on the client, you can enter the following commands:

cd /d "C:\Windows\Microsoft.NET\Framework\v4.0.30319"
regasm "%AppData%\Appeon\PBCloud\demo.appeon.com_app1\EncryptDecryptClass.dll" /tlb:testappeon.tlb  /codebase /nologo

If the commands need to be executed with the administrator rights, you should select the Run as administrator option.