Support Tip: Understanding ZENworks ApplState Files and Bundle Activity


ZENworks APPLState files are persistent XML files located in the %ZENworks_Home%\cache\zmd directory that track the "State" of all application objects that have ever been assigned to the device.  "Clearing" the ZENworks Cache will not clear these files.  Unassigning and even deleting a ZENworks Application object from the ZCC will not clear these files.  They are truly persistent until the ZENworks agent is uninstalled.

There will be one APPLState file per application object and be named in the format of {APPGUID}.Applstate.

The APPLState files track the following attributes:

  • Bundle Name
  • Bundle GUID
  • Bundle Current Version, which is the most recent version of the bundle ever detected by the local agent when checking assignments.
  • Last Association Time - If an application object is associated as refresh this value will be updated, otherwise, it will be unchanged.
  • Distribution Date - This is the last time the actions under the "Distribution Tab" of the application object were executed.
  • Installation Date - This is the MOST RECENT time the actions under the "Installation Tab" of the application object were executed.
    • Is Installed - This indicates if the Application Object is CURRENTLY flagged as installed.
    • Installed Version - This indicates the installed version of the application object.
  • Launch Date - This is the MOST RECENT time the actions under the "Launch Tab" of the application object were executed.
    • Launched Successfully - Determines if there were errors the last time the launch actions were executed.
  • Connection ID - All of the above are tracked for each "User" as well as each "Device".
  • Occurred PostPones - This tracks the number of times a bundle has been postponed.  This setting will not be covered further.

When the ZENworks Agent starts, it will read the details of all of the state files and store the details in memory for optimization purposes.  In general, one should NOT be editing or deleting these files manually, but if one does, it will not have any impact until the ZENworks Agent Service restarts.  

Note: The "ZMD" folder under cache also contains corresponding "APPDATA" files for each application object.  These are XML representations of the details of the application object.  While I will not be discussing this file in detail, there are two settings in this file I will be covering.  The "Bundle Order"  and "Wait For Previous Bundle Execution to Complete"  settings are found on the "Summary Tab" of the application object.  These settings help control the order in which bundles are executed as well as if the bundles should run in parallel.  This information is often useful when analyzing APPLSTATE files to understand what is happening on a device and so will be included in the discussion.

Opening a Single ApplState file to see the install state of a bundle is simple enough and should be mostly self-evident upon examination.  However, troubleshooting issues is open not about a single bundle but rather a job that seems more befitting for Dirk Gently's Holistic Detective Agency since it requires stepping back and taking a larger view and seeing how everything fits together.  For assisting with "Holistic" troubleshooting I have created a tool called AppStateParser2022.exe that will scan the Cache Folder and merge all of the data into a CSV file that can then be opened with the spreadsheet software of your choice for further analysis for issues such as...

  • When is the last time a given application was Installed or Launched?
  • What applications have been Installed or Launched Recently?
  • Are the Bundles Launching and Executing in the Order expected?
  • Are there any long-forgotten schedules kicking off bundles that should no longer be running?

The tool can be run against:

  • The local agent cache folder
  • Another local folder on the local computer.  (Example - Analyze an Extracted ZENINFO )
  • Remote Agent Cache folder (Requires Remote Files System Access via a Share.)
  • Remote Share Folder from which the ZDM contents have been copied.

Using the AppStateParser2022.exe utility.

The simplest method of using this tool is to simply "Double-Click" the program, which will bring up a dialogue to let you select the set of "APPLState" files one wishes to analyze.  If the ZENworks Agent exists on the device, the dialogue will open to the "ZMD" directory on the device.  Simply select any of the listed APPLSTATE files and all the files will be processed.  Output.CSV will be generated in the same folder as the utility, so make sure it has R/W access to create that file.  Upon completion, it will prompt if you would like to open the CSV file and if so will open it with the default application assigned to CSV files, usually a spreadsheet program.   Once the file is opened as a spreadsheet, simply use normal spreadsheet functions to manage the data as needed.

The CVS/Speadsheet will have a header column that identifies entry.  Most Bundles will contain multiple entries.  One for the SYSTEM as well as one for each user that may have logged into the system.  The date/time of "0001-01-01T00:00:00" indicates "Never".  All times for Distrubte/Install/Launch are maintained for each USER/Device.

The utility also supports a few command line parameters 

The FIRST parameter MUST be the PATH to the folder containing the APPLState Files: 

For Example:  AppStateParser2022.exe "\\\c\Program Files (x86)\novell\zenworks\cache\zmd"

APPEND may be the Secord or Third Parameter.  This will append "\Program Files (x86)\novell\zenworks\cache\zmd" to the specified path.

For Example: AppStateParser2022.exe "\\\c\"  Append  

SILENT may be the Second or Third Parameter.  If present, one will not be prompted to open "Output.csv".

Exe=  Is Optional, but must be the FINAL parameter.  This can be an alternate executable used to open Output.csv if the default application is not desired.

For Example: AppStateParser2022.exe "\\\c\"  Append  exe=Lotus.exe


Note: AppStateParser2022.exe is an updated version of AppStateParser2020.exe I had distributed previously.  Hopefully I have fully debugged the new features, but if an issue arises let me know and I will get an updated copy posted.

The core additions include:

  • Merging DATA from the corresponding APPDATA file
  • All Command Line Options.

Note2: I will include a "Sample" Output.csv from my lab in the ZIP with the executable.  I will try and add some discussion around reading that output for results that users find less than self-evident.

Note: The utility is written in AutoIt.


Configuration Management
How To-Best Practice
Support Tip
Comment List