Read AppSense Config (.aemp) with C#

The AppSense console (EmConsole.exe) is .NET based utility and uses the following DLLs to load AEMP configuration files, found in the same directory as EmConsole.exe

  • AppSense.AOM.Dll
  • Common.Deployment.Dll
  • EMConsole.Common.Dll
  • ObjectModel.Dll
  • Xceed.Compression.Dll
  • Xceed.FileSystem.Dll
  • Xceed.Zip.Dll

With these added as references to your C# .NET project all you need to do to open an AEMP file is to:

Common.Deployment.PackageManager manager = new Common.Deployment.PackageManager();

UEM.Application app=new UEM.Application();

manager.ReadPackage(<file path to aemp file>,app);

This will load all the configuration settings into app which you can than proceed to manipulate as desired.

An example is provided in the Command Line AempDumper utility I wrote below: (Note: You must run the EXE in same directory as EmConsole.exe or put required DLLs in same directory as the EXE, I cannot redistribute the AppSense DLLs you will need to provide your own)

Visual Studio 2012 C# Project + Binary https://skydrive.live.com/redir?resid=D1BB3113E6943B7F!2879&authkey=!ADARGinF8yKHhP8 (24 KB download)

The DLLs required at runtime are:

activedstypelib.dll
AppSense.Aom.dll
AppSense.Sccm.dll
AppSense.Sccm.UI.dll
ArchiveSupport.dll
Castle.Core.dll
ChangeTracking.dll
Common.Auditing.dll
Common.Auditing.UI.dll
Common.ConfigurationReport.dll
Common.Deployment.dll
CommonDialogs.dll
CommonDialogs.XmlSerializers.dll
CommonDialogsCore.dll
DevExpress.BonusSkins.v12.1.dll
DevExpress.Data.v12.1.dll
DevExpress.Printing.v12.1.Core.dll
DevExpress.Utils.v12.1.dll
DevExpress.XtraBars.v12.1.dll
DevExpress.XtraEditors.v12.1.dll
DevExpress.XtraGrid.v12.1.dll
DevExpress.XtraLayout.v12.1.dll
DevExpress.XtraNavBar.v12.1.dll
DevExpress.XtraPrinting.v12.1.dll
DevExpress.XtraTreeList.v12.1.dll
DevExpress.XtraVerticalGrid.v12.1.dll
EM.Language.dll
EM.Utilities.dll
EMConfigUpgrade.dll
EMConsole.Common.dll
EMConsole.Resources.dll
EMXObjectModel.dll
ExceptionHandling.dll
GroupPolicyAction.dll
HelpLinks.dll
ICSharpCode.TextEditor.dll
log4net.dll
Microsoft.Deployment.Compression.Cab.dll
Microsoft.Deployment.Compression.dll
ObjectModel.dll
PackageManager.dll
PackageManager.XmlSerializers.dll
PlugInAction.dll
SchemaUpgrade.dll
System.Data.SqlServerCe.dll
UICore.dll
UIFramework.dll
UIFramework.Interfaces.dll
Xceed.Compression.dll
Xceed.FileSystem.dll
Xceed.Zip.dll

About chentiangemalc

specializes in end-user computing technologies. disclaimer 1) use at your own risk. test any solution in your environment. if you do not understand the impact/consequences of what you're doing please stop, and ask advice from somebody who does. 2) views are my own at the time of posting and do not necessarily represent my current view or the view of my employer and family members/relatives. 3) over the years Microsoft/Citrix/VMWare have given me a few free shirts, pens, paper notebooks/etc. despite these gifts i will try to remain unbiased.
This entry was posted in .NET, AppSense and tagged . Bookmark the permalink.

2 Responses to Read AppSense Config (.aemp) with C#

  1. Pradeep says:

    This is exactly what I was looking for. I get a missing method exception oin UEM.Configuration.get_CustomGlobalSettings. Which version of Appsense did you build this against ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s