Managing Desktop Icon Positions

Maintaining the position of Desktop icons has always been an issue for users on Windows 2003 Citrix/Terminal Servers, especially when you’ve got roaming profiles in place and users are expecting to see their Desktop icons in the same place each time they log on.

To get around the problem we deploy two (2) freeware applications. Both have been written by a gentleman by the name of Jamie O’Connell (JamieOConnell at midiox dot com).

The first application is a user interface that adds “Save Desktop” and “Restore Desktop” options to the right click context menu for the Desktop. These options will appear in the context menu if a user right clicks on a blank area of the Desktop as per the screenshot below.

The layout must first be saved by selecting the “Save Desktop” option. If a user tries to restore the icon positions without previously saving them, the following warning will appear.

From the screenshot you can also see that each layout is saved based on the screen resolution. Since users will typically always connect using the same resolution, this shouldn’t be of concern. However, if a user connects at say 1024 x 768 and had only previously saved the layout when connected at 1280 x 1024, then the icons may possibly not end up in their correct positions.

This information is saved to the registry under the following registry key:
HKEY_CURRENT_USER\Software\JOConnell\DeskTop

The following screenshot represents the registry view.

For those of you that don’t understand how the HKEY_CURRENT_USER key structure works, it’s unloaded when the user logs off and is written back to the users profile folder as NTUSER.DAT. Therefore, these settings will roam as the user logs on to different servers within the farm.

This application is packaged as an MSI, using the Microsoft Windows Installer engine to install, making it so versatile to deploy.

More information about this application can be found here: http://www.midiox.com/html/desktop.htm

The second application is a command line (executable) that performs the same task and uses the same registry location. The advantage of this is that it can be added to the logoff and logon scripts so that the whole process can be automated for the users.

Simply place the desktopcmd.exe file in the %SystemRoot% (Windows) folder on the Citrix/Terminal server(s).

Add the following command to the logon script:

desktopcmd restore /y

Add the following command to the logoff script:

desktopcmd save /y

The output of the restore command will be:

Layout: Layout 1280 x 1024
Desktop Restored: 6 icons

Once again, if the layout was not previously saved, the command will output the following information:

No Layout Information Stored:
Layout 1280 x 1024

Both applications can be downloaded from here:
http://www.midiox.com/?http://www.midiox.com/jsoft.htm#Desktop

Direct links to the downloads are:
Desktop Restore: http://www.midiox.com/zip/dsrex.exe
Unicode Version: http://www.midiox.com/zip/dsrexu.exe
Console Command Line: http://www.midiox.com/zip/dtcmd.zip

Note: The UNICODE version is no different from the ANSI version except that it will work properly on FAR EAST language editions of WINDOWS 2000 and XP.  You don't need to download both.

The current versions of these tools were released in 2004, so they are compliant for the modern computing environment, and are safe to use.

 


    9th April 2007