Change the deployed app using commands

When the application is deployed (from the PowerBuilder IDE) or installed (from the packaged executable installer or zipped file) to the server, the app files and configuration files are generated with hash codes, to prevent files changed illegally from running. Therefore, you cannot directly change the deployed settings/files on the server, instead you will have to make changes in the project painter and then deploy the application again, or modify the settings/files using commands.

Note

You need to run the command line tool (the CustomizeDeploy.dll tool) as an administrator, otherwise, you may encounter the error: Access to the path 'C:\inetpub\wwwroot\salesdemo_cloud\1.01\appconfig.json.zip' is denied.

The CustomizeDeploy.dll tool allows you to:

  • Change the External Files -- The "External Files" refers to the packages, folders, and files (such as INI files, DLL/OCX etc.) that are deployed from External Files in the PowerServer project painter > Application page.

  • Encrypt the password -- You can encrypt 1) the database login password used in the compiled Web APIs > AppConfig folder > Applications.json file, 2) the proxy server password in the compiled Web APIs > UserConfig.json file > "ProxyOptions" block, or 3) the email account password used in the compiled Web APIs > UserConfig.json file > "EmailOptions" block. You can use the encrypted string instead of the plain-text string to protect sensitive information.

The CustomizeDeploy.dll tool can be found in two locations:

  • In the server: %WebRoot%\[appname]\[version]\CustomizeDeploy.dll

    To execute the CustomizeDeploy.dll file located on the server, you will need to install the ASP.NET Core Runtime 3.1 or later first.

    You can execute this file to change the external files or encrypt the password.

  • In the PowerBuilder IDE installation folder: %AppeonInstallPath%\PowerBuilder [version]\Pstools\CustomizeDeploy\CustomizeDeploy.dll

    To execute the CustomizeDeploy.dll file located in the PowerBuilder IDE installation folder, there is no need to install the ASP.NET Core Runtime as it is already installed with PowerServer Toolkit.

    You can execute this file to encrypt the password.


To run CustomizeDeploy.dll in Windows server:

  1. Install the ASP.NET Core Runtime 3.1 or later.

  2. Open the command prompt. (You'd better run the command prompt using an administrator by right-clicking it and then selecting "Run as administrator").

  3. Navigate to the server root folder > [appname] folder > [version] folder (for example, C:\inetpub\wwwroot\salesdemo_cloud\1.01).

  4. Execute the CustomizeDeploy.dll file using the dotnet command.

To run CustomizeDeploy.dll in Linux server:

  1. Install the ASP.NET Core Runtime 3.1 or later.

    dnf install aspnetcore-runtime-5.0
  2. Go to the server root folder > [appname] folder > [version] folder (for example, /var/www/html/salesdemo_cloud/1.01, or /usr/share/nginx/html/salesdemo_cloud/1.01).

  3. Right click the blank area within the folder and then select Open in Terminal.

  4. Execute the CustomizeDeploy.dll file using the dotnet command. Notice that the command and file name are case-sensitive in the Linux OS.