How to move user data from an Application Group into a Windows Settings Group

Version 1

    Verified Product Versions

    Environment Manager 10.0Environment Manager 8.6Environment Manager 8.5Environment Manager 10.1Environment Manager 2018.1

    Introduction

    There may be times where you want to move data from being persisted in an Application Group into a Windows Settings Group. However, just assigning a Windows Settings Group which persists the intended data will cause users to start from a blank state.

     

    Solution

    There are multiple ways to do this but the one that is most native and provides easy break points for testing is as follows:

     

    PHASE 1 - Exporting the data

     

    1. Create a new node in your Environment Manager configuration to perform the export under the User > Logon > Pre-Desktop or User > Logon > Desktop Created trigger.
    2. In this node configure either of the below:
      1. Export a whole application's data back into the user profile using EmCmdLet.dll
        • Specifics on using the method can be found here: Profile Migration PowerShell Interface
        • In effect, you will be loading the module in a Custom Powershell Action and use the Export-EMPManagedAppData method, specifying an application that you would like to export. This exports all data for the application from the virtual bubble into their respective real locations.
        • Following on from this you could move the data from the real user profile location into any persistent location you want to use.
      2. Export a specific key, folder or file using /APPSENSEVIRTUAL
        • Details on using this switch are here: Using the /APPSENSESPECIAL switch to interact with a managed (Personalized) application
        • The Environment Manager distinguishes between applications run with and without that switch. When the switch is specified it applies the personalization for the specified executable to whatever executable is being run.
        • This allows an application like cmd.exe to 'see' what the personalized application would. It can also interact with it as though it was the personalized application. Using common methods like xcopy, reg and the like can then be used.
    3. Configure your exported data to go to a persistent location. This could be a network path or a persistent vDisk depending on your platform. It could even be a local path that is outside of the user profile.
        • Using paths such as \\fileserver\dataexport\%username% will allow you to easily track what users have exported their data.
    4. Create a Windows Settings Group in Personalization that persists the data you want to persist outside of the Application Group.
        • Do not yet assign this group, if you do it will cause the data to be empty for your users!
    5. Deploy your configuration and let this run. You can run through the folders and confirm what users have successfully exported their data.

     

    PHASE 2 - Importing the data and assigning the Windows Settings Group

    It is recommended that the Personalization changes and deployment of the configuration below is done out of hours so that the WSG is not assigned while users are logged on.

    1. Once you are confident that all users have exported their data, you are ready for the second part of the configuration.
    2. Create a new node in your Environment Manager configuration to perform the import under the User > Logon > Pre-Desktop or User > Logon > Desktop Created trigger.
    3. In this node, reimport your data.
      1. If you chose to use hiving actions to move the data out to a file share, use a hiving action to move it back in.
      2. Likewise, if you are moving files about, use file or folder actions to move the data back in.
    4. In the User Personalization section of the Environment Manager console, assign the Windows Settings Group.
    5. Deploy your configuration out and ensure it gets downloaded and installed to your endpoints.

     

    Here is a timeline of what will happen

     

    • During phase 1, there is no change for your users. They will not notice a difference.
    • Every logoff that occurs during phase 1 will export the data.

     

    • Once phase 2 starts, on the first logon Personalization will bring down nothing as the Windows Settings Group has no data
    • Your import action will pull the previously exported data from the location and put it into the real location
    • On logoff, the export will occur first
    • Then Personalization will come along and the Windows Settings Group will pick the data up and store it in the database

     

    The final step in the process is for you to gain confidence that the Windows Settings Group has stored the data successfully. You can confirm this by using the Personalization Analysis subconsole by right-clicking on the Personalization Group that users are in and selecting it. From there, you can find a user, click into their profile and into Windows Settings. Right-click on your created Windows Settings Group and click on "Edit file list...". You should see the data you have configured to be captured represented. Once you are confident that your users are successfully storing data with the WSG, you can disable the export and import nodes you created in your Environment Manager policy configuration. The Windows Settings Group will instead handle this now at logon and logoff. If you were replacing a complete application group, you can unassign this from Personalization at this point.

    Because any path included in a WSG is automatically excluded from all application groups, there is no need to change your application group.