Fences 3.0 (Legacy) Volume Configuration Guide

Overview

The purpose of this document is to detail the steps necessary to configure Fences as a template for repeated use on more than one Windows user on the same machine or network-wide.  These steps are usually applied to a base image that is replicated across the corporate PC infrastructure.

This is legacy documentation. Please refer to the updated Enterprise Configuration Guide for Fences 4.0 for current best practices.

Considerations 

Fences does not create desktop icons as part of applying the layout.  The layout file only instructs Fences to create Fences and move icons into the Fences.  For creating default icons see, Creating Default Shortcuts or use your own GPO to have them exist natively.

When creating your template layout, try to use a resolution that is average for your target PC infrastructure.  It is important to use an average resolution because Fences will scale the layout up and down more accurately. 

Large changes in screen resolution can result in rounding issues (of the x and y coordinates) that can impact the fence automatic resize code.  Using an average resolution to create the layout will result in a small delta between the high and low resolutions; by doing this it improves accuracy when Fences calculates fence locations and sizes.  

All of the desktop icons required for the layout must be present.  Even if some of the icons may not appear on all machines, still include them in the layout.  If the icon target is not present, Fences will move the icon off of the desktop.

If you have a Fences Folder Portal within the layout, they will not work when the template is distributed.

Installing Fences and Template Creation

Installing Fences

Download Fences from the link here: Download.  Install Fences as you normally would any program using the default values throughout the setup wizard.

Creating and Saving the Layout Template

Create Fences and place icons in the Fences to design a “template” layout

 

Once you are happy with your Fences layout, do the following steps to “save” the layout to an XML file. 

From the command prompt type the following commands: 

   32bit:

    cd "\ProgramFiles\Stardock\Fences"

   64bit:

    cd "\Program Files (x86)\Stardock\Fences"

   Fences.exe /oemlayout

The dialog shown below will display (your Fences will appear to go away when done; that is expected).   

Click on ‘File’, then “Load Layout from my current Fences settings” to pull in the current Fences layout that will be used to create the template.

 Your created Fences should reappear after loading.

 

Next, click on 'Save' and give the layout a name of your choosing.  When creating a layout name, note the name for use later in this document.  Also, make sure to use a name that does not have spaces or special characters.  Click 'OK' when successful.

 

Video of Creating and Saving the Layout Template: https://cdn.stardock.us/support/uploads/Fences_Layout_Acme001.mp4

Applying the Layout

Now that you have saved the layout, the following steps will instruct Fences to automatically apply it to all users on a PC’s where the layout exists (we will cover how this can be deployed network wide later). 

First, you must create two registry entries that will be used by Fences to find your XML layout file. 

Create the following two keys in the HKEY_LOCAL_MACHINE(HKLM) section of the registry.(You must put these settings in HKLM, not the HKEY_CURRENT_USER section.) 

     HKEY_LOCAL_MACHINE\SOFTWARE\Stardock\Fences,OEM,REG_SZ,"[YOURLAYOUTNAME]"

     HKEY_LOCAL_MACHINE\SOFTWARE\Stardock\Fences,OEM-Theme,REG_SZ,"[YOURLAYOUTNAME]" 

Note: Do not include the .xml extension in the registry key data.  Simply use the file name without the extension.

 

Test the layout by creating a new user.  Log out and then back into the new user. Fences will automatically apply the layout to the new user.  If all the icons that were present on the default template are also on the new user's desktop (required), you should see the same Fences desktop layout:

 

 

Video of Appling the Layout: https://cdn.stardock.us/support/uploads/Fences_Layout_Acme002.mp4

Important Notes

Fences will not be created for items that are not on the desktop.  Said another way, if a Fence is empty, it is not created.  Furthermore, if an icon does not exist on another users Windows account, and the default template had only that icon in it, the Fence will not be created.

Fences will only apply the template layout ONCE.  If you need to “re-apply” the layout to an existing user, the following command can be issued: 

Fences 2

  32 bit and Fences 2

  "C:\Program Files\Stardock\Fences\Fences.exe" /applylayout "C:\ProgramData\Stardock\Fences\OEM\Layouts\YourTemplateName.xml"

  64 bit and Fences 2

  "C:\Program Files\Stardock\Fences\Fences.exe" /applylayout "C:\ProgramData\Stardock\Fences\OEM\Layouts\YourTemplateName.xml"

Fences 3

  32 bit and Fences 3

  "C:\Program Files\Stardock\Fences3\Fences.exe" /applylayout "C:\ProgramData\Stardock\Fences3\OEM\Layouts\YourTemplateName.xml"

  64 bit and Fences 3

  "C:\Program Files (x86)\Stardock\Fences3\Fences.exe" /applylayout "C:\ProgramData\Stardock\Fences3\OEM\Layouts\YourTemplateName.xml"

The Fences layout XML does not instruct Fences to create desktop shortcuts (see Creating Default Shotrcuts).  The layout file only instructs Fences to create Fences and move shortcuts from the desktop into a Fence. 

Fences has debug output that explains why an icon was or was not moved into a particular Fence.To see the debug output to diagnose why a shortcut does not get "Fenced" do the following: 

    Start / run / regedit.exe. Navigate to HKEY_CURRENT_USER\Software\Stardock

Then right-click on the folder in the left-pane there. From the menu, New, String Value. Call it Debug. Double-click on the new entry in the right-hand pane and set the Value data to 1. Run dbgview (you can download it from here) http://live.sysinternals.com/Dbgview.exe. This utility will allow you to capture the debug output for analysis. 

If you want to ensure that all shortcuts are put into a Fence, but may have additional applications installed after you create your layout, use a “Default Fence” to capture the remaining shortcuts.Configure the “default Fence” by right clicking on a Fence in your layout and click on Organize, “Place all icons in this Fence by default“.  Do this before you save your layout file.

Advanced Topics 

Creating Default Shortcuts

In order to instruct Fences to create shortcuts on the desktop when run for the first time, additional XML must be created.  Please note, this is an advanced topic and should be avoided if possible. 

As an alternative to using the default shortcut XML, shortcuts can be created manually and placed in the shared “Public” desktop.  The down side of using the “Public” desktop is that if one user deletes a shortcut, it is deleted for all users.  As a result, Microsoft restricted the public desktop folder (c:\users\public\desktop) so that non-Administrators cannot change the contents. 

To create the XML follow these steps. 

Create the following folder where the XML will be located 

    %programdata%\Stardock\Fences\OEM\DefaultXML\xx_xx 

Save each file as a different name in this folder.  The files can have any names as long as there are no collisions in the folder.  See below for “calculator.xml” as an example. 

Open Notepad.exe and paste the following XML into the document. Make sure the file is saved as UTF-8 using notepad or another file editor. 

    <?xml version="1.0" encoding="utf-8"?>

        <IconDefinition>

         <Title>Calculator</Title>

         <Image />

         <GUID>{DD9A4B02-C01B-11DF-BC80-D081DFD72085}</GUID>

         <Tooltip></Tooltip>

         <ActionType>exe</ActionType>

         <ActionParams>%windir%\system32\calc.exe</ActionParams>

       </IconDefinition> 

Note: Each file must have a unique ID.  You can generate a unique GUID for each shortcut here: Generate GUID Online  

The GUID must also be added to the layout XML using a file editor.  Open the layout

XML using notepad or another file editor and insert the GUID like this example: 

    <Shortcut>

      <OriginalTitle>Calculator</OriginalTitle>

      <Path>%windir%\system32\calc.exe</Path>

      <Arguments />

      <GUID>DD9A4B02-C01B-11DF-BC80-D081DFD72085</GUID>

  </Shortcut> 

Once you have all of your default shortcut XML files complete, create a new user to test the file.Log out and back in as the new user.  Fences should create a desktop shortcut for each default shortcut XML file. 

Note: Fences only creates the icons for a new user at first login.  To reapply the default shortcut XML files, issue this command from a command prompt.  This command is useful for testing XML files as you create them. 

    "C:\Program Files\Stardock\Fences Pro\Fences.exe" /loaddefaulticons 

Shortcut targets can be in either %programfiles% or %programfiles(x86)% and Fences will find them in either location. 

Network-wide Deployments

When considering your deployment, you will have to choose what users will get the layout (if not all) you created and that they (must) have the icons on the desktop for it to be applied properly.  Once known, those users will need the proper registry settings and the layout in the proper place on their PC:

C:\ProgramData\Stardock\Fences\OEM\Layouts\YourTemplateName.xml

Also, the layout will only be applied once (the first run).  This will enable users to configure Fences as they see fit after the initial run.  If you want it applied every time, you will need to run a script to apply the layout each time the user logs in:

32bit:
"C:\Program Files\Stardock\Fences\Fences.exe" /applylayout "C:\ProgramData\Stardock\Fences\OEM\Layouts\YourTemplateName.xml

64bit:
"C:\Program Files (x86)\Stardock\Fences\Fences.exe" /applylayout "C:\ProgramData\Stardock\Fences\OEM\Layouts\YourTemplateName.xml

(c) Copyright Stardock Entertainment. All rights reserved.