How to Install the CAM Agent Using a Batch File or Script
In order to gather information from Windows computers on your network, the collection of components called the CAM Agent must be installed. You can install it manually, or you can use a batch file or script.
Install the CAM Agent Using a Batch File or Script
The information in this topic applies to Windows machines only.
In order to install the agent via a batch file or script where no previous version of the agent is installed, the CAM Agent MSI file must be available. The client.msi file is available on the machine on which the CAM Administration Service is installed. By default, the folder is in one of the following locations:
- On 32-bit systems:
C:\Program Files\Cherwell Asset Management\CAM Agent\ClientInstallPackage
- On 64-bit systems:
C:\Program Files (x86)\Cherwell Asset Management\CAM Administrator\ClientInstallPackage
- Copy the ClientInstallPackage folder to a shared location where the installation will run.
- Create a batch file or script with the appropriate agent
installation syntax. The following steps contain the syntax to use, followed by
an example. Note that the entire syntax consists of one long command typed on
one line; do not enter any line breaks.
- For on-premises installations:Syntax for a batch file or script (version 12.2 and later):
msiexec.exe –i "<folder-containing-client-msi-file>\express software manager client.msi" /qn ESMWEBSERVICE=http://<access-point-machine>/camaccesspoint/clientservices.asmx
Example batch file or script syntax (version 12.2 and later):msiexec.exe –i "\\myserver\myshare\express_client\express software manager client.msi" /qn ESMWEBSERVICE=http://myiisbox/camaccesspoint/clientservices.asmx
Where
myiisbox
is the name of the CAM Access Point machine andhttp://myiisbox/camaccesspoint/clientservices.asmx
is the CAM Access Point URL. - For hosted installations:Syntax for batch file or script:
msiexec.exe –i "<folder-containing-client-msi-file>\express software manager client.msi" /qn ESMWEBSERVICE=http://<ap-proxy-machine>:<proxy port>/EMCServices/clientservices.asmx
Example batch file or script syntax:msiexec.exe –i "\\myserver\myshare\express_client\express software manager client.msi" /qn ESMWEBSERVICE=http://myproxybox:5002/EMCServices/clientservices.asmx
Where
myproxybox
is the name of the CAM Access Point proxy machine and5002
is the proxy port, and the following is the CAM Access Point URL:http://myproxybox:5002/EMCServices/clientservices.asmx
- For on-premises installations:
Uninstalling the CAM Agent Using a Batch File or Script
Create a batch file or script with the appropriate syntax to uninstall the agent. The syntax to uninstall the agent is as follows:
msiexec /q /x {04F73471-157F-4F63-A2AD-50C1BBEECD66}
Upgrading the CAM Agent Using a Batch File or Script
The recommended method for upgrading the CAM Agent is to uninstall the currently running version and install the new one. The steps required for each of these operations are described above. If you only want to upgrade an earlier version of the agent, check the agent's version number prior to uninstalling and reinstalling. The version of the CAM Agent is the value of the DisplayVersion key in this folder in the Windows Registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{04F73471-157F-4F63-A2AD-50C1BBEECD66}
A script that uses the Windows Scripting Host will allow you to make this Registry check, and then upgrade the agent only if there is a newer version available.