App Layering

Exclude files from layers (Advanced feature)

You can exclude specific files and folders from a composited layer to prevent files from persisting on a user’s desktop. For example, you can exclude antivirus software files and folders that should not persist for a desktop from one login to the next.

The exclusions you define are applied to a composited layer, one that is part of a published image. This feature is not enforced on a packaging machine, only on a published image where the layers have been composited. That means that you define the exclusions while creating the layer, include the layer in the image template, and then publish the image.


Excluded files and folders on elastic layers are not processed. Exclusions can only be processed when present in the image.

Specify files and folders to exclude

In the following folder, create one or more .txt files that specify paths to be excluded:

C:\Program Files\Unidesk\Uniservice\UserExclusions\

All valid paths to files and directories are excluded and then read from the image. All changes to those files and directories on the writable layer no longer persist.

If one of the files you create contains an invalid path, processing of that file stops and moves to the next .txt file within the UserExclusions folder.


Exclude a file:


Exclude a directory:



The following restrictions apply to exclusions.

Directory name

  • Begin the path with C:\
  • End with a Backslash (\)


These top-level directories cannot be excluded:

  • C:\
  • C:\Program Files\
  • C:\Program Files (x86)\
  • C:\ProgramData\
  • C:\Windows\
  • C:\Users\

The following characters and expressions are not allowed in exclusions:

  • No wildcards (no asterisks (*) or question marks (?))
  • No regular expressions (no %x%)
  • No forward slash (/)
  • No network (\\)
  • No path to a different directory (\..\)
  • No quotation marks (“)
  • No colon (:) after C:\


Log messages are available in:

C:\Program Files\Unidesk\Uniservice\Log\Log0.txt

Messages written to the log:

  • User exclusion added: Includes the details about the file or directory.

  • Failed to add user exclusion: Includes details about the unsupported exclusions.

Exclude files from layers (Advanced feature)