There’s not a lot of official information about the prefs.txt
file that the Omnissa Horizon client (formerly the VMware Horizon client) creates and uses.
I’ve figured out that the prefs.txt
text file is in XML format and is generated by the Horizon client, usually once the user changes a setting in the Horizon client. It seems that prefs.txt
is used to store all the user settings that the user has configured within the Horizon client.
Here’s an example of the contents of a prefs.txt
file.
<?xml version="1.0" encoding="utf-8"?>
<Root>
<RecentServer serverName="horizon.company.com" isSyncShortcutsEnabled="false">
<SecondaryServerList />
<ShortCuts />
<FileRedirection>
<AppExtensionInfo AppId="cn=microsoft_edge,ou=applications,dc=vdi,dc=vmware,dc=int" AppName="Microsoft Edge">
<Extension Name="htm" Display-name="Microsoft Edge HTML Document" />
<Extension Name="html" Display-name="Microsoft Edge HTML Document" />
<Extension Name="mht" Display-name="Microsoft Edge MHT Document" />
<Extension Name="mhtml" Display-name="Microsoft Edge MHT Document" />
<Extension Name="pdf" Display-name="Microsoft Edge PDF Document" />
<Extension Name="shtml" Display-name="Microsoft Edge HTML Document" />
<Extension Name="svg" Display-name="Microsoft Edge HTML Document" />
<Extension Name="webp" Display-name="Microsoft Edge HTML Document" />
<Extension Name="xht" Display-name="Microsoft Edge HTML Document" />
<Extension Name="xhtml" Display-name="Microsoft Edge HTML Document" />
<Extension Name="xml" Display-name="Microsoft Edge HTML Document" />
</AppExtensionInfo>
</FileRedirection>
<RecentDesktop desktopID="cn=vdis,ou=applications,dc=vdi,dc=vmware,dc=int" autoSyncToggleKeysMode="7">
<LastDisplaySize displaySize="Fullscreen" height="0" width="0">
<SelectedMonitors />
</LastDisplaySize>
</RecentDesktop>
</RecentServer>
<DataSharingSettings Allowed="1" />
<BlastSettings allowClientH264YUV444="true" allowClientHEVCYUV444="true" allowClientHDR="true" DisableDisplayNetworkState="false" DisableDisplayNetworkStateManually="true" />
<BrokerJumpList>
<BrokerJump BrokerName="horizon.company.com" BrokerArguments="horizon-client://horizon.company.com/" />
</BrokerJumpList>
<AutoCheckForUpdate autoCheckForUpdate="false" />
<sharingList allowAccessRemovable="true" shareHomeDirectory="true">
<sharingItem from="C:\Users\daniel" />
<sharingItem from="T:\" />
</sharingList>
<GeolocationSharingSettings GeoSharingAllowed="true" />
<WebrtcSettings WebrtcScreenSharePerm="1" enableWebRTCRedirection="true" WebrtcSuppressScreenSharePrompt="true" />
</Root>
Code language: HTML, XML (xml)
The prefs.txt
file is stored in the user’s AppData Roaming folder.
The file will be in the following locations depending on which version of the Horizon client you use.
- For Horizon clients version 2412 or newer, it is stored in
%AppData%\Omnissa\Omnissa Horizon Client
- For Horizon clients older than version 2412, it is stored in
%AppData%\VMware\VMware Horizon View Client
Horizon-Prefs Script
Because the contents of the prefs.txt
file are predictable, I created a script called Horizon-Prefs. You can find the script on my GitHub https://github.com/thedxt/Omnissa#horizon-prefsps1. The Horizon-Prefs script can place the prefs.txt
file in the correct location for all users, just a single user, or both.
I’ve used my script to deploy the prefs.txt
file to systems to configure some Horizon client settings that don’t have GPO options. I’ve also used it to configure Horizon client settings on systems that aren’t joined to a domain.