Video Screencast Help
Symantec Appoints Michael A. Brown CEO. Learn more.

The AexConfig.exe Utility

Created: 20 Oct 2011 • Updated: 02 Nov 2011
Language Translations
bmc_saxman's picture
0 0 Votes
Login to vote

AeXConfig.exe

The AeXConfig.exe utility is installed with NS in the bin directory under the root NS installation directory (the default path of the installation directory is C:\Program Files\Altiris\Notification Server). This utility transfers configuration settings from a solution's XML configuration files into the Altiris database. AeXConfig also undoes configuration when the /unconfigure command line option is used. For a complete list of the command line options, open a Command Prompt, navigate to the NS bin directory, and enter AeXConfig /h.

AeXConfig returns 0 for OK, non-0 for failure. Error return values are generic, and do not map to any specific error cause.

The /unconfigure flag

An /unconfigure does not actually delete items in NS 6. It only marks them as deleted. Reinstalling a solution "Undeletes" items marked as deleted. The /deleteitems flag will delete all the items (which is unrecoverable).

How to tell AeXConfig.exe to ignore the /unconfigure flag

Starting from SP1 build 4810 AeXConfig.exe can be configured to ignore the /unconfigure flag.

If a DWORD value named IgnoreProductUnconfigure is present in the '''HKEY_LOCAL_MACHINE\SOFTWARE\Altiris\eXpress\Notification Server\ProductInstallation\{ProductInstallationGuid} registry key and has a value of 1''' then AeXConfig.exe will ignore the /unconfigure flag. ProductInstallationGuid is the Product installation GUID of the product that is to ignore the unconfigure flag.

The ignore flag in the registry is cleared as soon as AeXConfig runs. So subsequent calls to AeXConfig /unconfigure will be respected.

The main purpose of this option is to address behavior found in NS SP1 and earlier. Unconfiguring a solution will remove all solution-custom security permissions and their assignements. If your SP1 solution does a major upgrade from your previous version, it will unconfigure then configure. If you had custom security permissions, you will need to use this flag.

For SP2 and later, there is no need to set this registry value, as the issue is addressed directly by the NS core.

AeXConfig in the development environment

It is often useful to view the NS log using the LogViewer utility (C:\Program Files\Altiris\Notification Server\bin\LogViewer.exe) when you launch AeXConfig in Visual Studio. At present, the log will usually display two error messages each time it runs in the development environment. These two specific errors may be ignored during development. They relate only to expected conditions in the production environment that do not exist in the development environment. The descriptions of the two errors begin: Failed to register MSI version ... and RegisterProductInstallation - failed to obtained product version information for logging purposes ... Full text of sample error messages of these types follow:

Date: Dec 09 16:21:45:001
Source: Altiris.NS.StandardItems.Product.Product.RegisterMsiVesrion
Description: Failed to register msi version for 94a19373-47cf-484e-a838-300ba6ccdc17
    ( Unhandled exception.  Type=System.Reflection.TargetInvocationException Msg=Exception has been thrown by
       the target of an invocation. Src=mscorlib
StackTrace=
   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args,
      Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)

   at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target,
      Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters)

   at Altiris.NS.StandardItems.Product.Product.RegisterMsiVesrion(Guid msiProductCode, Guid productGuid)

Inner exception.  Type=System.Runtime.InteropServices.COMException Msg=ProductInfo,Product,Attribute  
  Src=Msi API Error StackTrace= COM Exception errcode = -2147467259 )
Date: Dec 09 16:21:44:001
Source: Altiris.NS.StandardItems.Product.ProductInstallation.RegisterProductInstallation
Description: RegisterProductInstallation - failed to obtained product version information for 
    logging purposes. Exception : Exception has been thrown by the target of an invocation.

AeXConfig and AIM

Prior to NS7, individual solutions called AeXConfig with the /configure flag as a custom action from their MSI installation process.

This served two tasks:

  1. Wrote registry settings to HKLM\Software\Altiris\eXpress\Notification Server\Product Installation, which were used during the intial database configuration and database reconfigures
  2. Performed product configuration immediately (where the NS database has already been configured)

In order to allow existing solution MSIs to be installed without modification within the context of the Altiris Installation Manager, AeXConfig now performs a registry check to see if it is running within AIM. If AeXConfig is called within the context of AIM, then product configuration is not performed (as AIM will perform this step).

AIM must perform these steps:

  1. When AIM starts, set HKLM\Software\Altiris\AIM\InstallInProgress=1 (DWORD) (or at least prior to installing any MSIs)
  2. When AIM shuts down, set HKLM\Software\Altiris\AIM\InstallInProgress=0 (AIM must also try to clear this even in the situation that it crashes or shuts down unexpectedly)

Solution Registry Information

When ProductInstallation.RegisterProductInstallation is called, the following registry information is layed down:

HKLM\Software\Altiris\eXpress\Notification Server\ProductInstallation\{product-installation-item-guid}\

  • CreatedDate: yyyy-mm-ddThh:mm:ss
  • Depends
  • InstallationFilePath: full path to root config file for solution/component
  • MsiProductCode: Windows MSI product code
  • MsiProductGuid: Altiris product GUID
  • MsiUninstallParam: flags to pass to msiexec to uninstall solution/component
  • Name: name of solution/component

ProductInstallation.RegisterProductInstallation is called by:

  • Performing a product configuration
  • Or, running AeXConfig /configure (even if the InstallInProgress switch is set, indicating running from within the context of AIM)

Performing a product unconfigure also removes the registry key.