Difference between revisions of "OcsInventory Agent"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(updated version check to work in the event a 32-bit agent is installed on Win64)
(Add package for version 2.0)
Line 8: Line 8:
 
   and IBM AIX.
 
   and IBM AIX.
  
=== Using the standard OcsAgentSetup.exe ===
+
=== [2.x series] Using the standard installer ===
 +
Note that this package requires wpkg version >= 1.2.  Also, OCS-NG changed its version numbering from 1.x to 2.x, so this actually has a lower version number than the last 1.x series - so this script will not update a 1.x installation as is.
 +
 
 +
In addition to the basic installation, this package also copies a file "cacert.pem" to the program's data directory - this should contain the server's SSL cert, along with the root CA's SSL cert and any intermediate SSL certs (if applicable).  This script detects the Windows version and places the file in the appropriate directory, but only Windows XP (32-bit) and Windows 7 are supported.  To add more OSes, see [[Extended_host_attribute_matching]].
 +
 
 +
<source lang="xml">
 +
<package id='ocsinventory'
 +
    name='OcsInventory'
 +
    revision="%version%"
 +
    priority='5'
 +
    reboot='false'
 +
>
 +
 
 +
<variable name="OCS_SERVER" value="https://hq.palantetech.com/ocsinventory" />
 +
<variable name="version" value="2.0.0.20" />
 +
 
 +
    <check type="logical" condition="or">
 +
      <check type='file' condition='versiongreaterorequal'
 +
      path='%PROGRAMFILES%\OCS Inventory Agent\OCSInventory.exe' value="%version%" />
 +
      <check type='file' condition='versiongreaterorequal'
 +
      path='%PROGRAMFILES(x86)%\OCS Inventory Agent\OCSInventory.exe' value="%version%" />
 +
    </check>
 +
    <install cmd="%SOFTWARE%\ocsinventory\OCS-NG-Windows-Agent-Setup.exe /S /SERVER=%OCS_SERVER%" />
 +
        <install os='windows xp' cmd='%comspec% /c copy %SOFTWARE%\ocsinventory\cacert.pem "%allusersprofile%\Application Data\OCS Inventory NG\Agent"' />
 +
        <install os='windows 7' cmd='%comspec% /c copy %SOFTWARE%\ocsinventory\cacert.pem "%PROGRAMDATA%\OCS Inventory NG\Agent"' />
 +
    <upgrade cmd="%SOFTWARE%\ocsinventory\OCS-NG-Windows-Agent-Setup.exe /S /SERVER=%OCS_SERVER% /UPGRADE" />
 +
    <remove cmd='"%PROGRAMFILES%\OCS Inventory Agent\uninst.exe" /S' />
 +
</package>
 +
</source>
 +
 
 +
=== [1.x series] Using the standard OcsAgentSetup.exe ===
  
 
<source lang="xml">
 
<source lang="xml">
Line 30: Line 60:
 
Be sure to adjust the check version depending on the version you install, and substitute your OCS server for ''your.server.here''.
 
Be sure to adjust the check version depending on the version you install, and substitute your OCS server for ''your.server.here''.
  
=== Using  a customized ocspackage.exe ===
+
=== [1.x series] Using  a customized ocspackage.exe ===
  
 
Before all, create your customized ocspackage.exe following the [http://wiki.ocsinventory-ng.org/index.php/Documentation:Agent upstream documentation].
 
Before all, create your customized ocspackage.exe following the [http://wiki.ocsinventory-ng.org/index.php/Documentation:Agent upstream documentation].

Revision as of 19:48, 24 August 2011

OcsInventory-ng Windows Agent

Silent install for OcsInventory-ng Agent for Windows.

 OcsInventory is an application that automatically inventories computer systems, 
 reporting back to a central web-based interface. Agents are available for 
 Microsoft Windows 95/98/Me/NT4/2000/XP/2003, Linux, *BSD, Mac OS X, Sun Solaris 
 and IBM AIX.

[2.x series] Using the standard installer

Note that this package requires wpkg version >= 1.2. Also, OCS-NG changed its version numbering from 1.x to 2.x, so this actually has a lower version number than the last 1.x series - so this script will not update a 1.x installation as is.

In addition to the basic installation, this package also copies a file "cacert.pem" to the program's data directory - this should contain the server's SSL cert, along with the root CA's SSL cert and any intermediate SSL certs (if applicable). This script detects the Windows version and places the file in the appropriate directory, but only Windows XP (32-bit) and Windows 7 are supported. To add more OSes, see Extended_host_attribute_matching.

<package id='ocsinventory'
     name='OcsInventory'
     revision="%version%"
     priority='5'
     reboot='false'
>

<variable name="OCS_SERVER" value="https://hq.palantetech.com/ocsinventory" />
<variable name="version" value="2.0.0.20" />

    <check type="logical" condition="or">
      <check type='file' condition='versiongreaterorequal'
       path='%PROGRAMFILES%\OCS Inventory Agent\OCSInventory.exe' value="%version%" />
      <check type='file' condition='versiongreaterorequal'
       path='%PROGRAMFILES(x86)%\OCS Inventory Agent\OCSInventory.exe' value="%version%" />
    </check>
    <install cmd="%SOFTWARE%\ocsinventory\OCS-NG-Windows-Agent-Setup.exe /S /SERVER=%OCS_SERVER%" />
        <install os='windows xp' cmd='%comspec% /c copy %SOFTWARE%\ocsinventory\cacert.pem "%allusersprofile%\Application Data\OCS Inventory NG\Agent"' />
        <install os='windows 7' cmd='%comspec% /c copy %SOFTWARE%\ocsinventory\cacert.pem "%PROGRAMDATA%\OCS Inventory NG\Agent"' />
    <upgrade cmd="%SOFTWARE%\ocsinventory\OCS-NG-Windows-Agent-Setup.exe /S /SERVER=%OCS_SERVER% /UPGRADE" />
    <remove cmd='"%PROGRAMFILES%\OCS Inventory Agent\uninst.exe" /S' />
</package>

[1.x series] Using the standard OcsAgentSetup.exe

<?xml version="1.0" encoding="UTF-8"?>

<packages>
<package id='ocsinventory' name='OcsInventory' revision='1' priority='5' reboot='false' >
    <check type="logical" condition="or">
      <check type='file' condition='versiongreaterorequal' 
       path='%PROGRAMFILES%\OCS Inventory Agent\OCSInventory.exe' value='4.0.6.1' />
      <check type='file' condition='versiongreaterorequal' 
       path='%PROGRAMFILES(x86)%\OCS Inventory Agent\OCSInventory.exe' value='4.0.6.1' />
    </check>
    <install cmd='%SOFTWARE%\ocsinventory\OcsAgentSetup.exe /S /SERVER:your.server.here /NP' />
    <upgrade cmd='%SOFTWARE%\ocsinventory\OcsAgentSetup.exe /S /SERVER:your.server.here /NP /UPGRADE' />
    <remove cmd='"%PROGRAMFILES%\OCS Inventory Agent\uninst.exe" /S' />
</package>
</packages>

Be sure to adjust the check version depending on the version you install, and substitute your OCS server for your.server.here.

[1.x series] Using a customized ocspackage.exe

Before all, create your customized ocspackage.exe following the upstream documentation.

<?xml version="1.0" encoding="UTF-8"?>

<packages>
<package
        id="ocsinventoryagent"
        name="OCS Inventory Agent"
        revision="4061"
        priority="60"
        reboot="false">

        <check type="uninstall" condition="exists" path="OCS Inventory Agent 4.0.6.1" />
        <install cmd='%SOFTWARE%\ocsagent\ocspackage.exe' />
        <upgrade cmd='%SOFTWARE%\ocsagent\ocspackage.exe' />
</package>
</packages>