Symantec Management Platform (SMP) Community

 View Only

The AexConfig.exe Utility 

Oct 20, 2011 09:45 AM

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.

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Oct 09, 2014 11:24 AM

Thanks Ludovic!

Oct 09, 2014 08:59 AM

Hello QuietLeni,

The config files are under each solution folder, normally under a Config folder.

It should read like:

"Altiris\Inventory Solution\ConfigInventorySolution.config"

"Altiris\Console\config\console.config"

etc.

Note that these examples were not verified so they may be slightly different on a server).

Now, the /configureall task will go thru each installed solution and pull it's config file from the database if I'm not mistaken, so you may miss unproperly configured solutions.

I do favour the targetted configure option, but this comes with the challenge of knowning which packages should be reconfigured.

Note that SIM normally does this type of validation and proposes to reconfigure solutions when they are not reporting to be configured properly.

Oct 09, 2014 07:29 AM

Hi,

Does anyone know exactly how the /configureall action works? What .config file is being used to execute this? I ask this, because on my development server, I took to pieces the .config files the other day and noticed that there is a top level file for Patch Management Core and then this has paths that then feed to the other configuration files that then have the configurations for the details.

So... ...if this is how the AexConfig /configure <Solution>.config command works, where is the .config file that then holds the information about where the <Solution>.config files are, OR (and I doubt this), does the AexConfig /configureall just trawl for a certain set of .config files in the Altiris directory and then just execute these in turn?

Kindest regards,

QuietLeni

Related Entries and Links

No Related Resource entered.