Customizing the Sync Client Distribution with Pre-Seeded Configuration

For deployment of large number of sync clients, it is often desirable to customize the sync client with pre-seeded configuration so that

  1. it is much easier for end users to setup the client, and
  2. it is much harder for end users to mess up with things like local DB connection credentials.

The sync client zip file, e.g. pervasync_client-4.0.0.zip, is located on the sync server at <Pevasync server home>/web/download. You can un-pack it, modify it and zip it back. Then when sync users download the client from the server web, they will get the modified version. Following are the steps.

  1. Un-pack the zip file, for example:

    cd \pervasync\web\pervasync\download

    unzip pervasync_client-4.0.0.zip

  2. Now you have a sync client folder, e.g. \pervasync\web\pervasync\download\ pervasync_client-4.0.0. Change directory to the “bin” sub-folder and start the pvc.bat/pvc.sh program.

    cd pervasync_client-4.0.0\bin

    pvc.bat

  3. Complete the client setup process. In the process the sync client will copy the appropriate JDBC driver (or MySQL Java connector) to the “lib” folder of sync client home under web\pervasync\download. Sync client will also save the local DB connection info and sync server connection info in file pervasync_install.dat under “config” folder of sync client home.
  4. Copy pervasync_install.dat to classes\pervasync\config\ under sync client home.

    copy ..\config\pervasync_install.dat ..\classes\pervasync\config\

  5. Edit the copied file pervasync_install.dat under classes\pervasync\config\. Remove the properties that you don’t want to be pre-seeded. Any properties left in the file will become pre-seeded and read-only during end user setup. You would want to leave system and admin user/password there and remove sync user name, device name and password. Also don’t touch the encryption key.
  6. Do a reset of the client using the Setup tab of the sync client setup tool..
  7. Zip up the client home folder.

    cd \pervasync\web\pervasync\download

    zip pervasync_client-4.0.0.zip pervasync_client-4.0.0

    rmdir /S /Q pervasync_client-4.0.0

 

When end users download and setup your customized sync client distribution, certain fields will have pre-seeded, read-only values as you desired.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s