Workspace Streaming

 View Only

Workspace Streaming: Metering Package Creation in CLI Mode 

Feb 22, 2011 11:02 AM

The command line interface provides a method to automate the package creation. To create the metering package in CLI mode, we need to use XPT file as an input parameter.

About XPT:

The input .XPT file provides the data required by the composer to create the package and it can be customized depending upon the application.
It contains name of the process which needs to be tracked as well as Package name.

Syntax to add the package name in the XPT file:

Package name will be fetched automatically from the folder name which we provide during the package creation.

If the user wants to provide the package name explicitly, add the below entry to the XPT file:

<PROPERTY NAME="PackageName" TYPE="1" VALUE=" Enter the Package Name here "/>

Syntax to add the tracking application in the XPT file:

To track the applications using the metering package, we need to add the process name in the XPT file.

Syntax to add one process:

<PROPERTY NAME="ApplicationExecutablePath" TYPE="1">" Enter the Process Name here "</PROPERTY>

Syntax to add more than one process:

<PROPERTY NAME="ApplicationExecutablePath.x" TYPE="1">" Enter the Process Name here "</PROPERTY>

Where x=1,2,...n

WiseVCCMD Command-Line Parameters:

Syntax for package creation with XPT file as an input parameter:

WiseVCCMD /updatexml:<XPT file> /metering:<Tracking Rule> <package-path>

Command Parameter Function
/updatexml:<XPT file> To create a new metering package using the XPT file provided here
/metering:<Tracking Rule> Tracking Rule which is used for license consumption.
<package-path> The location where the package needs to be created

Sample package creation:

Let us take Mozilla Firefox as an example to illustrate the Metering package creation process in CLI mode.

Steps to create Firefox Metering package:

1.Create a XPT file (Say Input.xpt) with the following commands:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<PACKAGE>
 <TEMPLATE VERSION="1.0">
<DESCRIPTIONUPDATE>
      <PROPERTY NAME="PackageName" TYPE="1" VALUE="Firefox_Metering"/>
      <PROPERTY NAME="ApplicationExecutablePath" TYPE="1">firefox.EXE</PROPERTY>
    </DESCRIPTIONUPDATE>
  </TEMPLATE>
</PACKAGE>

2. Create a batch file(Say test.bat) with the following commands:

@echo off
cd "%programfiles%\Symantec\Wise Virtual Composer
WiseVCCMD.exe  /updatexml:"C:\Temp\Input.xpt" /metering:"Mozilla Firefox"  "C:\Package\Firefox_Metering"
SET AS_ERROR=%ERRORLEVEL%
echo "Error Code" %AS_ERROR%.

3. Open a command prompt.

4.Execute the test.bat.

Error Codes:

The Streaming Composer command line interface exits with an error code and these are some of the common error codes:

Return error code:

#define PKG_ERROR_SUCCESS 0
#define PKG_ERROR_BAD_ARGUMENTS 3001
#define PKG_ERROR_INVALID_INPUT_XPT 3003
#define PKG_ERROR_DIR_NOT_EMPTY 3004
#define PKG_ERROR_OUPUT_DIR 3005
#define PKG_ERROR_BUILD_XPF 3011
#define PKG_ERROR_UNKNOWN 3012
#define PKG_ERROR_CREATE_ZIPFILE 3013

Sample XPT's for commonly used applications:

These are the XPT's for commonly used applications like Adobe Reader and Office.

XPT for Adobe Reader application:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<PACKAGE>
 <TEMPLATE VERSION="1.0">
<DESCRIPTIONUPDATE>
      <PROPERTY NAME="PackageName" TYPE="1" VALUE="Adobe_Metering"/>
      <PROPERTY NAME="ApplicationExecutablePath" TYPE="1">Acrord32.EXE</PROPERTY>
    </DESCRIPTIONUPDATE>
  </TEMPLATE>
</PACKAGE>

XPT for Office application:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<PACKAGE>
 <TEMPLATE VERSION="1.0">
<DESCRIPTIONUPDATE>
      <PROPERTY NAME="PackageName" TYPE="1" VALUE="Office_Metering"/>
      <PROPERTY NAME="ApplicationExecutablePath.1" TYPE="1">Winword.EXE</PROPERTY>
      <PROPERTY NAME="ApplicationExecutablePath.2" TYPE="1">Excel.EXE</PROPERTY>
      <PROPERTY NAME="ApplicationExecutablePath.3" TYPE="1">powerpnt.EXE</PROPERTY>
    </DESCRIPTIONUPDATE>
  </TEMPLATE>
</PACKAGE>

Statistics
0 Favorited
0 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
doc file
Metering package creation in CLI mode.doc   45 KB   1 version
Uploaded - Feb 25, 2020

Tags and Keywords

Comments

Dec 12, 2011 03:55 AM

Hey , Nice document .

Related Entries and Links

No Related Resource entered.