Category: dynamic environment manager (dem)

  • Elegant Profile Management, featuring Symbolic Links.

    Elegant Profile Management, featuring Symbolic Links.

    Enterprise IT transformations from persistent to non-persistent desktops always bring new challenges with application delivery and profile management. I’ve used a variety of profile management tools from DEM and Profile Unity to Ivanti Environment Manager and FSlogix and they all have their respective strengths and weaknesses. I hope you find it useful!

    Scenario: An application delivered as an AppVolume package requires user settings to be present on the local machine c:\ at launch time and roamed at logoff.

    Typically I would tackle this issue using a combination of DEM logon tasks and DirectFlex. A shortcoming of DEM is that it cannot roam C:\ data using application templates. To work around this constraint, a logon task can be used to import the configuration files as a one-time event. DirectFlex can be enabled (optionally) if needed. At logoff, we can use a script to move the files to %roamingappdata% location. An application template can pick them up there.

    Why didn’t this work?

    There were various Windows Smart Screen and UAC challenges initially. Scripts needed unblocking, and I had to create a DEM Elevated Task to execute them. After some wrangling, the logon scripts worked, and the configuration was copied from a network share to the local machines C:\ at logon. Success! However, the export job failed. The copy job from C:\ to %appdata% failed sporadically, I suspect, due to the AppVolume package detaching from the VM before the files could be copied.

    Enter: Symbolic Links

    Symbolic links are like an evolution of the Windows shortcut. A symbolic link can point to a file or directory in another location and be deployed via group policy or DEM. These can be used as an elegant function to circumvent the aforementioned DEM configuration. It’s particularly useful for applications that don’t store their configuration in local or roaming %appdata%.

    Example

    In this scenario, we need a directory from a remote location to be available on a VM C:\ root after the Appvolume package has attached.

    There are 2 types of symbolic links: soft links or hard links, and they can point to directories or files. In this scenario we’ll point to a directory that is known as a junction link

    mklink /J "<location>\<dir>" "<\\UNC or <dir>"

    The application will see the directory as a native file system folder:

    Summary

    This was a really useful discovery for me personally. No doubt there are plenty of veteran techies reading this and thinking, ‘Nobody reads the CMD prompt manual these days!’—and you’d be right. I feel somewhat naive for having not discovered this years ago, having wrestled with countless profile issues where an application writes to %Programdata% or C:\.

    On this thought, one area where Ivanti Environment Manager shines is in managing these types of scenarios. It does a better job than DEM at picking up dynamic changes to non-appdata locations. Equally, where DEM only operates at logoff/logon and triggered tasks, Ivanti can capture on-the-fly changes to the operating system directories. However, there is an infrastructure footprint required to run Ivanti EM; which is where DEM shines in providing excellent value whilst displacing incumbent profile systems.

    I hope you’ve found this useful; please comment below if you’ve had good or bad experiences with symbolic links!

    Leave a comment