Banner.gif (5609 octets)


Project Home
OCS Inventory
   What is it ?
   What's New
   Todo
   Features
   Setup instructions
   Usage
   Build instructions
   Help FAQ
   Contributors

Report Bugs or request new features for OCS Inventory
OCS Inventory Discussion Forums
Email OCS Developer Team and mailing lists

Upgrade Instructions

  • If you're are running OCS Inventory 2.0 beta 4 or 2.0 Final, just download the ZIP only version "OCSInventory_X.X.zip" and replace all executable and DLLs with the new ones. The database did not change between 2.0 beta 4 and 2.01 release.

  • If you already have OCS Inventory 1.97 installed, MAKE A COPY of your database.
    Follow the installation instructions and select the same setup folder as your previous installation.
    Then, run OCS Inventory Manager, log in under an Administrator account and import your old configuration to the new database with the command "Import from another DB" of the "File" menu.

 

Setup Instructions

Unzip the OCSInventory_X.X_Setup.zip file in a folder and run setup.exe on a file server (web server if you want to use the Web Manager) of your network.

OCS Inventory Setup will create the following sub folders.

  • Application : agent OCSInventory.exe and OCSInventoryCSV.exe, manager OCSInventoryManager.exe, import utility ImportCSV.exe and database OCSInventory.mdb.
    • AccessLogs : CSV format computers access logs.
    • BIOS : CSV format computers BIOS informations.
    • Drivers : WinIO driver and tools.
    • Graphics : CSV format computers graphic adapters informations.
    • Hardware : CSV format computers hardware informations.
    • LogicalDrives : CSV format lcomputers ogical drives informations.
    • Network : CSV format computers network adapters informations.
    • Printers : CSV format computers printers informations.
    • Results : CSV format computers softwares informations.
  • Docs: documentation files in HTML format.
    • css
    • : style sheet for documentation.
    • en
    • : English documentation.
    • fr
    • : French documentation.
    • images
    • : Common documentation images.
  • Web Manager: ASP 2.0 files for Web Manager application (if selected).
    • css : style sheet files.
    • csv : ASP files for CSV support.
    • database : ASP files for querying the devices database.
    • images : images files.
    • includes : contains common used ASP and JavaScript functions, and config.inc file.
    • operators : ASP files for managing OCS Inventory Operators.
    • options : ASP files for managing OCS Inventory settings.
    • vendors : ASP files for managing Vendors, Applications and Licenses.

OCSInventory.mdb, OCSInventory.exe, OCSInventoryCSV.exe, OCSInventoryManager.exe, ImportCSV.exe files MUST be kept in the same directory ! This is because when the Agent, Manager or Import Utility runs it uses the current path to attach to the database.

WARNING: OCS Inventory now comes with an empty database (no vendors and applications definitions included), as requested by numerous users. You must download the lastest Vendors and Applications definitions from the download page and import them with the Manager (see Usage page).

 

1. Running the Agent.

The Agent is a simple application that runs on all of the clients.

NB. The Agent was hard coded to only run once per day ! This is so you can leave it in a login script and it only runs in the morning, Not after every re-boot or login.

Share the Application folder, done under the name "Inventory$" by Setup if you've selected it. Adding a '$' at the end of the share name will hide the share from client computers. Only Applications or people knowing exactly the share name can access it by entering the UNC path by hand in Windows Explorer.

Make sure it is accessible to everyone (Authenticated users if you are running Windows NT4 SP 4 or higher or Windows 2000/XP) and that everyone has Read/Write access. If, for example, you put the files in \\MYSERVER\INVENTORY$, then all you need to do to run the agent is put \\MYSERVER\INVENTORY$\OCSInventory.exe in the default login script !

If you don't want to do it that way you could e-mail the users a link and ask them to run it.

Another way is to put a shortcut in the "Startup" folder of "Start" menu.

Or do it yourself by hand.

Their may be a lot of hard disc activity for 1 or 2 minutes when the agent run. Once the Agent has run open the OCS Inventory Manager or Web Manager file and check the reports to see what it has found.

CSV support requirements

OCS Inventory Agent is able to check computers that doesn't have up to date MDAC or DAO 3.5 components. Agent configuration is stored by OCS Inventory Manager in the agent folder on the CSV files Config.csv and Apps.csv. The results are stored in CSV files on the following sub folders of the Agent folder (created by Setup).
  • AccessLogs : CSV format computers access logs.
  • BIOS : CSV format computers BIOS informations.
  • Graphics : CSV format computers graphic adapters informations.
  • Hardware : CSV format computers hardware informations.
  • LogicalDrives : CSV format lcomputers ogical drives informations.
  • Network : CSV format computers network adapters informations.
  • Printers : CSV format computers printers informations.
  • Results : CSV format computers softwares informations.

If check results are stored using CSV support, each of these folders will contain a file called ComputerName.csv (except perhaps Results and/or AccessLogs folders if there is no application detected or access log required). When you import CSV results to the database, all the files are deleted, except those on the Hardware sub folder which control the frequency of checks on client computers.

You can find a description of CSV files used by OCS Inventory here.

Its as simple as that. So let me know what you think !

NB: If you encounter error while running the Agent, see HELP - FAQ page.

 

1.1. Using Daniel Arbour's BiosInfo tool to retrieve informations from BIOS.

Daniel Arbour (Daniel.Arbour@Abbott.com) has build a 16 bits tool in DOS mode to bypass Win32 protected mode to access the BIOS. You can use this tool to retrieve informations from BIOS and store them to a CSV file.

You can call this with the following without argument, and it will display informations to screen, or you can call it with the computer name as first argument, and optionally a filename as secong argument and it will store BIOS informations to a CSV file. If called without filename as argument, the file is created in the current execution folder with the name "ComputerName.CSV", otherwise the tool uses the filename passed in the command line to store the informations.

Next, you just have to call the Agent with the "/BIOS" or "-BIOS" command line switch to tell it to import the results (see the Usage page).

You can find a sample script to run OCSInventory with this tool in the file named "run_ocs.bat". Just edit the first lines to match your needs and call it from your logon script with a command like "Call run_ocs.bat".

@echo off
REM --------------- BEGIN CONFIG ------------------------
REM Update the following values to match your need
REM -----------------------------------------------------

REM Set the server network share you are using for OCS Inventory.
REM This script assume that it is the Application folder which is shared.
REM So, the Drivers folder is just under the network share.
SET SERVER_SHARE="\\MYSERVER\Inventory$"

REM Set the drive letter you want to use to connect the server network share.
SET DRIVE_LETTER=Z:

REM Update the following destination directory to match your need.
REM It must be the same directory under Win9X/ME/NT/2000/XP.
SET DEST_FOLDER=C:\BIOSINFO

REM --------------- END OF CONFIG -----------------------
REM Do not modify below unless you know what you are doing.
REM -----------------------------------------------------

REM Test is not already done.
if exist %DEST_FOLDER%\BiosInfo.exe goto NO_SETUP

REM Setup BiosInfo.exe is required.
echo.
echo Setting up BIOSINFO Tool.
echo BIOSINFO Tool, by Daniel Arbour.
echo.

REM Connect the server network share to a drive letter.
net use %DRIVE_LETTER% %SERVER_SHARE% /PERSISTENT:NO

REM Create the destination directory.
md %DEST_FOLDER%

REM Copy executable to dest dir.
copy /v %DRIVE_LETTER%\Drivers\BiosInfo.exe %DEST_FOLDER%

REM Disconnect the drive letter from server network share.
net use %DRIVE_LETTER% /DELETE

echo.
echo BIOSINFO Tool successfully setup.
echo.

:NO_SETUP

REM Call BIOSINFO Tool to store results in a file named BIOS.CSV
%DEST_FOLDER%\BiosInfo.exe BIOS %DEST_FOLDER%\Bios.csv

REM Launch OCS Inventory with import of BIOSINFO results.
%SERVER_SHARE%\OCSInventory.exe /BIOS=%DEST_FOLDER%\BIOS.CSV

REM Nothing else to do.

 

1.2. Setting up the WinIO driver to retrieve informations from BIOS.

Caution ! This is an experimental tool. It does not work on all computers, especially under Windows 95 and Windows NT4. However, it works great on my LAN with Windows 98 SE and Windows 2000 SP2. I recommend that you ensure it is working on all your computers type and/or configuration  with the DumpDMI.exe tool before you deploy it.
SUPPORT OF WINIO WILL BE DISCONTINUED AND REPLACED BY WMI IN THE FUTURE RELEASE. WMI provides the same thing, but is included in all new Microsoft OS (Windows Me, 2000, XP, 2003) and is available as an addon for Windows 98 and NT4.

OCS Inventory V2.00 is able to retrieve informations from DMI tables of a DMI/SMBios compliant BIOS. Because of Win32 protected mode, it requires a system level driver to be setup on the client computer. OCS inventory uses "WinIO" Version 2.00 driver from Yariv Kaplan (http://www.internals.com).

Setup of the WinIO driver is done by "SetupWinIO.exe" tool in the "Application\Drivers" folder. Use "SetupWinIO.exe -h" to display usage of this tool.

Under Windows 9X/Me, just run on each computers the "SetupWinIO.exe" executable from "Application\Drivers" folder. This will copy the file "WinIO.VxD" to the system directory. You can use the login script to deploy this driver on computers with the following commands:

REM Check if Windows NT 2000 XP
if exist "C:\WinNT\System32\$winnt$.inf goto NEXT
REM Windows 9X
\\MYSERVER\INVENTORY$\Drivers\SetupWinIO.exe

:NEXT

Under Windows NT4/2000/XP, the driver must be setup under an Administrator account, because it is launched at system startup as a Windows NT driver service. So, run on each computers the "SetupWinIO.exe" executable from "Application\Drivers" folder. This will copy the file "WinIO.sys" to the system directory  and register the driver in the system level services.

NB : There is 2 way to get DMI tables.

  • Searching in 0xF0000 to 0xFFFFF low memory address range the PnP header of the BIOS to get DMI tables address. This way is used in the current version of OCS Inventory, but does not work on all computers.
  • Using the 51h BIOS function to retrieve the DMI tables. This way is not yet build in OCS Inventory.

Once you've setup the driver, you can use the "DumpDMI.exe" tool in "Application\Drivers" folder to display in a console the content of DMI tables. Use "DumpDMI.exe -h" to display online help for this tool. This tool works like SMBios2 tool from IBM Corp.

 

2. Viewing reports and managing configuration.

There is 2 way to view database content.

  • OCS Inventory Manager, the Windows graphical user interface.
  • An ASP 2.0 enabled web server (Microsoft IIS/PWS 4 or higher, ChiliSoft ASP...) if you want to use the Web Manager.

 

2.1. Running OCS Inventory Manager Windows GUI.

Just run the OCSInventoryManager.exe file and enter authentication informations (default is "Admin" as Operator ID and "Admin" as Password). You can run OCS Inventory Manager from a client computer by running \\MYSERVER\INVENTORY$\OCSInventoryManager.exe.

OCS Inventory Windows Manager require DAO 3.5 to be setup. See HELP - FAQ page on how to setup DAO 3.5.

 

2.2. Running OCS Inventory Web Manager through an ASP 2.0 Enabled Web Server.

OCS Inventory Web Manager has been tested on Windows NT 4 + IIS 4, Windows 2000 Server + IIS 5, Windows XP Pro + IIS 5.1 web server. It's buid in ASP 2.0 and must work on ASP 2.0 compliant web servers. Following instructions applies to IIS 4 and higher web server.

  1. With the Internet Service Manager, add a virtual folder called for example Inventory at the top of your web site which point to the Web Manager folder. Now, it is not required to create a new application for this virtual folder. We've stopped using global.asa file because any change to this require the web server to be restartd. Configuration is now stored in the includes/config.inc file.
  2. Be sure that the Application folder has Read/Write Access for the web server account (IUSR_MACHINE with IIS and Windows NT/2000).
  3. Open the "includes/config.inc" file with a text editor and at least update the "INVENTORY_FOLDER" value to set the full path to the "Application" folder which contains the database. Configuration is set to use OleDB Jet 4.0 driver to access the database. This configuration must work on many systems, but, if needed, the config file contains commented lines (begining by a ' character to allow using OleDB Jet 3.5 driver or ODBC data source. Update this settings if OleDB Jet 4.0 is not working on your computer.
    Here is a sample config file:

    '== BEGIN CONSTANTS ============================================================
    
    Dim Inventory_ConnectionString, Inventory_RuntimeUserName, Inventory_RuntimePassword
    Dim Inventory_CommandTimeout, Inventory_ConnectionTimeout, Inventory_Folder
    
    ' YOU MUST MODIFY THE FOLLOWING CONSTANT
    ' Specify where is the database folder
    ' Needed for CSV support, \ at the end of the path is required
    Inventory_Folder = "E:\Developp\OCS Inventory\V 2.01.000\Application\"
    
    ' Access DB connection info alternatives
    
    ' Connect to DB directly with OLEDB Jet provider version 3.5 (ODBC Data Source is not required)
    ' You MUST UPDATE the path to the database
    ' Inventory_ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.5;Data Source=" + Inventory_Folder + "OCSInventory.mdb;"
    
    ' Connect to the DB using OLEDB Jet provider version 4.0 (ODBC Data Source is not required)
    ' You MUST UPDATE the path to the database
    Inventory_ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Inventory_Folder + "OCSInventory.mdb;"
    
    ' Connect to the DB using ODBC (you must define a System DSN called HotLine using Control Panel/ODBC Data Sources applet)
    ' Inventory_ConnectionString = "DSN=Inventory;Description=OCS Inventory Database;SERVER=(local);Regional=Yes"
    
    ' When using ODBC with SQL server, Oracle, Sybase, DB2... you must specify a user name and password to connect the database
    ' Inventory_RuntimeUserName = "InventoryUser"
    ' Inventory_RuntimePassword = "InventoryUserPassword"
    ' When using the standard Access database, no user name or password is required
    Inventory_RuntimeUserName = ""
    Inventory_RuntimePassword = ""
    
    Inventory_CommandTimeout = 30
    Inventory_ConnectionTimeout = 20
    
    '===============================================================================
    '== DO NOT MODIFY BELOW ========================================================
    '===============================================================================
    
    strVersionOCS = " OCS Inventory Web Manager Version 2.01"
    
    '== END CONSTANTS ==============================================================
            
  4. Open your favorite web browser and browse the URL http://myserver/Inventory. You will be prompt for authentication informations (default is "Admin" as Operator ID and "Admin" as Password).

NB:

  • OCS Inventory Web Manager can now export CSV configuration, but cannot import CSV check results. You must setup the OCS Inventory Import Utility to automatically import CSV check results with the system scheduler (see below).
  • Also, OCS Inventory Web Manager will not be able to import your old configuration from another database. You have to use OCS Inventory Manager, Windows version.
  • If you encounter error while running Web Manager, see HELP - FAQ page.

 

3. Setting up the OCS Inventory Import Utility.

This utility allows you to automatically import CSV checks results and export Configuration to CSV files.

It must be run from the command line, or through the system scheduler (you can schedule import in the night for example).

Usage:

ImportCSV /HELP or -HELP to display the help screen.
ImportCSV [CSV_IMPORT_ROOT_FOLDER] [/EXPORT_CONFIG]

where

  • CSV_IMPORT_ROOT_FOLDER is the path to root folder where to find CSV files (optional). If not provided, the utility will try to import from the executable folder. If the folder name contains spaces, it must be set between quotation marks ". UNC path for the folder name are allowed.
  • /EXPORT_CONFIG or -EXPORT_CONFIG means to also export the configuration to CSV files (optional).

The import utility write logs to the standard output. You can capture them by redirecting the standard output.

Example: ImportCSV "E:\Developp\OCS Inventory\V 2.01.000\Application\" /EXPORT_CONFIG >> ImportCSV.log
This will export configuartion files Config.csv and Apps.csv to the folder specified, and import CSV check results from the normal sub-folders. Alls logs will be appended to the file named ImportCSV.log.

To run this utility with the system scheduler, just add a task with the command line you need, choose the execution time, and make sure that the user running the task as correct rights on the directires, database and CSV files (see HELP-FAQ).