Using NS6 Custom Inventory in NS7
|Article:HOWTO10489|||||Created: 2009-08-12|||||Updated: 2009-08-12|||||Article URL http://www.symantec.com/docs/HOWTO10489|
Using NS6 Custom Inventory in NS7
Many of us have created a good number of custom inventory source files that amounts to a considerable investment of time, energy and cost. It would be a shame to have to duplicate those efforts to recreate the custom inventory in NS7. This document describes how to utilize the NS6 custom inventory scripts on an NS7 server.
Custom Inventory in NS7 is significantly different than in NS6. In fact, the two methods are incompatible. NS6 custom inventory will not run in an NS7 environment as an inventory process. However, by utilizing the data class creation and software management capabilities of NS7, it is possible to continue using the NS6 custom inventory files in an NS7 environment, thus preserving the investment in NS6 custom inventory.
Prior to Upgrading to NS7
Before upgrading to NS7, please ensure that the following is done to preserve the NS6 custom inventory files. If you use stand-alone inventory, be sure to complete steps 3 & 4, also.
- Backup all the custom inventory scripts (cit, xml, etc.) in the above inventory directories.
- Backup all the ini files in the above inventory directories that invoke AeXCustInv.exe. By default, the file naming convention for these files is aexinvsoln*.ini.
- Backup all the stand-alone inventory packages in the above inventory directories.
- Backup the NSCap\bin\Win32\X86\AeXPkgEditor.exe file.
The directory paths for the custom inventory and related files are:
c:\program files\notification server\nscap\bin\win32\x86 c:\program files\notification server\nscap\bin\win32\x86\inventory solution.
NOTE: It is recommended that all files on the NS6 server in the ...\nscap\bin directory be backed up prior to beginning the NS7 migration and a copy of these files be made accessible for post migration configuration.
Prior to setting up the Software Resource package, ensure that the following prerequisites have been met.
- The Java 2 JRE 1.6 for use by certain NS Console screens. (As of this writing, Java JRE 6 Update 11 is available and seems to work fine).
- Appropriate interpreters for Perl, Python, VBScript, etc.
- The Software Management Solution agent must be installed on each client computer.
- The 7.x version of aexinvcollector.exe must exist on the NS7 server. This is installed by default as part of the NS7 installation.
- Either migrate the 6.x custom inventory data classes as part of the NS6 to NS7 migration or create new custom inventory data classes in the NS7 system.
Following are the high-level steps to using NS6 custom inventory on an NS7 server:
- Create the custom inventory data class in the NS7 console.
- Copy 6.x custom inventory source files (cit/xml) to a specific directory on the NS7 server.
- Create/modify an INI file with the custom inventory and collector command lines - same format as in NS6.
- Create a Software Resource, a package and a command line.
- Create a Task to run the NS6 custom inventory.
Create a Custom Inventory Data Class
- In the NS7 Console, click Settings, All Settings.
- Expand Discovery and Inventory, Inventory Solution and click on Manage Custom Dataclasses.
- Click on '* New Dataclass'.
- Enter 'User Account' for the name.
- Enter a Description. Note: At this time, please do not use any punctuation or special characters in the data class name, i.e., '-', '.', etc. or in the description.
- Click 'OK'.
- After the screen reloads, highlight the new dataclass and click 'Add attribute'.
- For the attribute name, enter "Name".
- Leave thedata type as string and maximum size as 50.
- In the'Key' drop-down list, select "No". The 'Data required' value will automatically change to "No". Leave this set to "No".
- Repeat steps 7, 8, 9 and10 for an attribute named "SID".
- Repeat steps 7, 8, 9 and10 for an attribute named, "Disabled".
- Check the option to 'Allow multiple rows froma single computer resource'. This is necessary in this example since multiple users can be reported on each computer and each will require a unique row in the database.
- Click 'Save changes' at the bottom of the screen.
- A completed custom dataclass would appear as shown below.
Copy NS6 Custom Inventory Source Files To A Specific Directory
The NS7 installation creates a package directory for NS6 custom inventory purposes. The path to this directory is:
"\program files\altiris\notification server\nscap\bin\win32\x86\Inventory\Custom Inventory 6.1"
- Copy all desired cit, xml and ini files from the NS6 server to this directory on the NS7 server. These files will then be available to the Software Resource process, described below.
This directory contains the following files:
- AeXInvSoln.exe - Same file as that was provided in 6.1 SP2. This Launches AeXCustInv.exe and AeXNSInvCollector.exe as specified in AeXInvSoln.ini.
- AeXCustInv.exe - This is a different file than that was provided in 6.1 SP2. It behaves in the similar way that it used to in 6.1 SP2, but have few bugs fixed.
- AeXNSInvCollector.exe - This is a different file than that was provided in 6.1 SP2. This behaves similar way that it used to in 6.1 SP2 but with the only difference that now it generates the NSEs in the new format that is required for posting inventory to NS 7.0.
- AeXNSEvent.dll - This is a new file, it was not present in 6.1 SP2. AeXNSInvCollector.exe uses this file for generating the NSEs in new format.
- AeXInvSoln.ini - Specifies an example of how to launch the AeXCustInv.exe and AeXNSInvCollector.exe.
- AeXCustInvStd.cit - Sample custom inventory script from 6.1 SP2.
Create or Update Inventory Solution INI Files
In NS6, there were several *.ini files that controlled the inventory processes that were to be ran on client computers. These ini files contained batch type commands, similar to the following
aexauditpls.exe /hidden /output xml aexmachinv.exe aexcustinv.exe /in .\AeXCustInvStd.cit /out AeXCustInvStd.nsi aexsnplus.exe /output xml aexnsinvcollector.exe /hidden /nsctransport /v default /useguid
To run NS6 inventory in NS7, we will need similar *.ini, or batch, files to execute the desired command lines. These files need to be in the same directory as the source cit/xml files, which is: "\program files\altiris\notification server\nscap\bin\win32\x86\Inventory\Custom Inventory 6.1". A sample ini file, named AeXInvSoln.ini, is included in this directory by default.
It is possible to include all desired custom inventory files in a single *.ini file and have a single Software Resource, package, command line and task. More likely, it will be desirable to create multiple *.ini files, one for each custom inventory or set of custom inventory processes, along with a Software Resource, package, command line and task for each.
These updated files should, under normal circumstances, do nothing other than run one or more aexcustinv.exe command lines followed by aexnsinvcollector.exe as the last command in the file. However, it may also be necessary to include custom commands or programs in this *.ini file. In this scenario, it may be necessary to run a 3rd party or custom app to collect data, create output data and have custom inventory gather that data and report it to the Notification Server. Since the *.ini file is essentially a batch file that is executed by the client agent, it is possible to include other pertinent commands in the *.ini file.
A sample *.ini file for an NS7 custom inventory task would look something like this:
aexcustinv.exe /in .\win32_useraccount.xml /out win32_useraccount.nsi aexnsinvcollector.exe /hidden /nsctransport /v default /useguid
Create a Software Resource
A Software Resource is similar to a Software Delivery Package and Program in NS6. It contains the package definition, including the path to the package, and the program definition, including the desired command line.
To create a Software Resource for a custom inventory package, do the following:
- In the NS Console, click on 'Manage Software'.
- Click on the "Software Catalog" menu item in the left-hand pane.
- Click on 'Import'. A new window will popup. (Ignore any warnings about configuring the Software Library. We will not be using the Software Library for this demo.)
- In the 'Package Source' drop-down list, select 'Access Package from an existing UNC' from the 'Source' drop-down list.
- In the new 'Location' text box, browse to: \\local_NS7_servername\nscap\bin\win32\x86\Inventory\Custom Inventory 6.1.
- Click on "Display Location".
- Highlight AeXInvSoln.exe.
- Click on 'Set Installation File".
- Click Next
- Select the 'Create a new software resource' radio button.
- Enter a name for this package. Note that for this example, the text '- Software Resource' has been appended to facilitate identification later.
- Ensure that 'Open software resource for editing when finished' is checked in the lower-left corner of this window.
- Click OK. The window will change.
Create a Software Resource Package & Command Line
- Leave the 'Properties' tab alone.
- Select the "Package" tab.
- Notice that the previously named software resource has been added automatically as a package.
- In the 'Command Lines' section, highlight the entry named 'Install' with 'aexinvsoln.exe' as the command line.
- Click the Edit (pencil) button in that section. A new window will appear.
- Enter "Custinv - Win32_UserAccount - CommandLine" in the 'Name' field.
- Check 'Command line requires a package'.
- Select the package named 'Custinv - Win32_UserAccount - Software Resource' in the 'Package' drop-down list.
- In the 'Installation File Type" drop-down list, select 'EXE Software Installation File'.
- In the 'Command Type" drop-down list, select 'Custom'.
- Change the 'Command Line' to read: "AeXInvSoln.exe /s win32_useraccount". The double-quotes do not appear to be needed so they can be removed for this demo.
- Click 'Save changes'.
Create a Job/Task to Run Custom Inventory
Now that the software resource, package and command line have been created, a Software Quick Delivery task can be created and scheduled.
- Go to 'Manage', 'Jobs and Tasks'.
- If needed, click on the top menu tree entry titled 'Jobs and Tasks' to load the 'Jobs and Tasks Portal'.
- Click on 'Create a new job or task' to begin the wizard.
- Scroll down toward the bottom and expand the 'Software' menu item, if it is not already expanded.
- Click on 'Quick Delivery' in the Software menu item list.
- In the new window, change the name and description.
- In the 'Software Resource' drop-down list, select 'Browse' and either browse to the custom inventory package or type in the name. It will load for you if you type the name correctly.
- Select the correct command line.
- Select the correct install package.
- Click 'OK'.
At this point, the screen will refresh and the task will be added to the menu tree. The right-hand screen will load the Software Settings and Task Status screen for this task.
- The task can be run immediately using the 'Quick Run' method. Alternatively, it can be scheduled by selecting the 'New Schedule' option in the lower portion of the screen.
If the following error appears while scheduling the quick delivery task, it indicates that the Software Management Solution agent has not been installed on the client computers.
To remedy this:
- Go to Actions, Agents/Plug-ins, Rollout Agents/Plug-ins. Alternatively, go to Settings, All Settings.
- Drill-down to Agents/Plug-ins, Software, Software Management, <Platform>.
- Enable the 'SoftwareManagement Solution Plug-in for <Platform> Install.
- Once the clients install the Software Management Solution plug-in, reschedule the task.
Article URL http://www.symantec.com/docs/HOWTO10489