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, once 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.
Limitation
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 C:\Program Files\Unidesk\Uniservice\UserExclusions\
folder, create one or more .txt
files that specify paths to be excluded.
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.
You can also use a *
character to wildcard one directory for exclusion. For example, C:\Users\*\AppData\Local\Temp\
, where *
indicates any user name. In this case, any user name that matches the rest of the path fits the exclusion rule, allowing the administrator to skip the user’s \Temp
directory for all users who use that image.
For each exclusion rule, you can only wildcard one directory (use one *
) in a single path. You cannot exclude multiple directories with one *
. For example, using the rule C:\Top\*\Bottom\
excludes the files in directories C:\Top\First\Bottom\
, C:\Top\Second\Bottom\
, and so on. But files in the directory C:\Top\First\Second\Bottom\
are not excluded, because there are two directories between \Top\
and \Bottom\
rather than one.
There is no limit to the number of exclusion rules you can set containing a wildcard (*
).
Examples
Exclude a file:
c:\test\test.txt
<!--NeedCopy-->
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论