AMT Help Files

Path Interface

The Path object (IAmtPath) is returned by the CreatePath function of the ComScript connection interface. This object provides access to the paths configured for the application in the Control Center. The paths are read-only and cannot be changed from within the script.

The following functionality is provided:

Properties

Name Type Access Description
ApplicationPath String Read-only The path to the root directory of the application as set in the Control Center.
AppName String Read/Write The current application name.
CallPath String Read-only The path to the callable executables of the application.
ErrorCode Integer Read-only Nonzero when an error has occurred in the Path object.
ErrorDescription String Read-only When an error has occurred (or no error), the description of the error.
ExtractPath String Read-only The path to the directory of the extract files of the application.
HelpPath String Read-only The path to the directory of the help files of the application.
ListBoxPath String Read-only The path to the directory of the Listbox files of the application.
LoggingPath String Read-only The path to the directory of the log files of the application.
PrintPath String Read-only The path to the directory of the Print files of the application.
ReportPath String Read-only The path to the directory of the Reports of the application.
ScriptPath String Read-only The path to the directory of the Scripts of the application.

Functions

Function name Return type Parameters Description
Name Type
ApplicationPathByAppName String AppName String Returned is the path to the root directory of the application given in AppName.
ExtractPathByAppName String AppName String Returned is the Extract path of the application given in AppName.
LoggingPathByAppName String AppName String Returned in the Logging path of the application given in AppName.
PrintPathByAppName String AppName String Returned is the Print path of the application given in AppName.
ReportPathByAppName String AppName String Returned is the Report path of the application given in AppName.
ScriptPathByAppName String AppName String Returned is the Script path of the application given in AppName.

Example

PowerShell

# See ComScript Connection Interface
# ...

$ComScr.Connect()

# Create an Object of the Path Interface to be able to retrieve application paths.
$Paths = $ComScr.CreatePath()

$TestExtractPath = $Paths.ExtractPath

$CMAppPath = $Paths.ApplicationPathByAppName('CUSTOMER_MANAGEMENT')

if ($Paths.ErrorCode -ne 0) {
  [void]$Msg.AddMsgInformation("ErrorCode is: $($Paths.ErrorCode)")
  [void]$Msg.AddMsgInformation("ErrorDescription is: $($Paths.ErrorDescription)")
}

# Finally release the variables and clean up the session.
$ComScr.Dispose()

Contents