DSM Script - Unknown variable: COMPUTERPATH

Document ID : KB000006297
Last Modified Date : 14/02/2018
Show Technical Document Details

When executing a dms script manually with dmscript following error occurs "Unknown variable: COMPUTERPATH"


On Windows following message appears: 



On Unix/Linux following message appears:





This problem occurs if the DMS script is using a predefined AM string constant like ComputerPath and this variable has not be initialized.


On Windows

dmscript.exe executes a command like this in order to generate a file with values for all AM constants :

amagentsvc "/computerscriptvars=c:\users\Administrator\AppData\Local\Temp\dms6717.tmp"


But if AM Agent is running at the same time, this command fails and dmscript executes the DMS script without initialization of AM constants. It is why ComputerPath is not defined.


The solution is :

  • Wait that AM Agent is terminated before executing dmscript.


  • Execute this command when AM Agent is not running :

amagentsvc "/computerscriptvars=c:\temp\script.ini"

and execute dmscript with parameter -i_dms. This command will work even if AM Agent is running :

dmscript test.dms "-i_dms: F:\temp\script.ini"







On Unix/Linux

The file with AM constants is stored under file $CA_ITRM_BASEDIR/Agent/AM/data/config/script.ini


Remark :

This file is created on the machine if at least one AM job of type script is attached to the machine.

If the file does not exist, create a small test script AM job and attach it on the machine. Then execute "caf start amagent".

This will create the file $CA_ITRM_BASEDIR/Agent/AM/data/config/script.ini


Then execute these command lines :

cp $CA_ITRM_BASEDIR/Agent/AM/data/config/script.ini /tmp

dmscript test.dms -i_dms: /tmp/script.ini




Additional Information:

See following link for a list of "Asset Management Scripting Language Predefined String Constants" :