A blog with focus on experiences with the Windows Client operating systems…
RSS icon Email icon Home icon

  • Restoring Internet Explorer favorites from an invalid UE-V package

    Posted on March 2nd, 2017 By Andreas Stenhall + No comments

    Those of you who know me know that I am somewhat stubborn and I never give up. This case could easily have gotten anyone to crack! This blog post shows a way to restore favorites from within a UE-V (User Experience Virtualization) package that UE-V cannot use to roam the favorites, as the package is considered invalid.


    A user has created some 2346(!) favorites in Internet Explorer over the years. UE-V is used to roam favorites. After the user reinstalled the machine from Windows 7 to Windows 10, the favorites went missing.


    To start with, the package supposedly containing the favorites (MicrosoftInternetExplorer.common.pkgx) could still be found in the SettingsPackages folder and the size was 1,24MB and dated just a week ago. Those of you that have worked with UE-V know that a package that large signals that it contains a rather large amount data. Therefore, with that indication I assumed that the favorites is still lurking in there.

    First thing to try was to just force the read of the package using via the UE-V agent as is the case whenever IE is started or closed, however Event Viewer revealed that UE-V thinks there is some kind of problem with the package.

    The initial settings package for settings location template "MicrosoftInternetExplorer.common" is invalid. The initial settings package will be replaced with a new copy.

    Now it is time to analyze the package itself. Note: This took quite some time to process by the cmdlet and it seems that the UE-V agents takes the same amount of time to process this large amount of favorites (~30 seconds).

    Export-UevPackage c:\temp\MicrosoftInternetExplorer.common.pkgx | out-file C:\temp\ MicrosoftInternetExplorer.common.txt

    Reading the output text file revealed that the user had 2346 favorites, data in the following format:

    <Setting Type="VT_FILE" Name="file://{1777F761-68AD-4D8A-87BD-30B759FA33DD}\Folder1\Name of site 1.url" Action="Update">FEBB399A-8DF5-4B3D-B73D-A8167F61EB6B.pkgdat</Setting>
    <Setting Type="VT_FILE" Name="file://{1777F761-68AD-4D8A-87BD-30B759FA33DD}\Folder1\Name of site 2.url" Action="Update">9FA223F9-F065-4269-B02C-E467A6B26459.pkgdat</Setting>
    <Setting Type="VT_FILE" Name="file://{1777F761-68AD-4D8A-87BD-30B759FA33DD}\Folder2\Name of site 3.url" Action="Update">2393C0D8-AEDE-4D11-9CE3-E7E1E4B039CA.pkgdat</Setting>

    Next up, rename the MicrosoftInternetExplorer.common.pkgx to MicrosoftInternetExplorer.common.zip and open it up. Note that you probably also would want to unblock the ZIP file before extracting the contents, choosing Properties and Unblock. Opening the PKGX as a ZIP shows us all the PKGDAT files listed in the output from Export-UevPackage. Extract the PKGDAT files to a folder, in my example c:\Temp\PKGDAT.

    With these data sources, we have everything we need to recreate the URLs and their structure. Basically, what we need from the output from Export-UevPackage is the folder where the URL file is stored, the name of the URL file and the name of the PKGDAT filename.


    With the aforementioned pieces of data, we can automate and match this to rebuild the Favorites entirely, using this PowerShell script:

    $urls = (Export-UevPackage c:\temp\MicrosoftInternetExplorer.common.pkgx).split(“`n”) | select-string VT_FILE

    foreach ($extracted in $urls)

    $hash1 = $extracted -split ‘<Setting Type=|Name=|Action=|</Setting>’
    $folder = $hash1[2].split(“\”)[1]
    $urlname = $hash1[2].split(“\”)[-1].Replace(‘”‘,“”)
    $pkgdat= $hash1[3].Split(“>”)[1]

    New-Item c:\temp\RestoredURLs\$folder -type directory

    if ($folder -match ‘”‘)
    Copy-Item c:\temp\PKGDAT\$pkgdat c:\temp\RestoredURLs\$urlname
    } else {
    Copy-Item c:\temp\PKGDAT\$pkgdat c:\temp\RestoredURLs\$folder\$urlname

    This recreated the favorites and in the same structure as it was! The user was indeed very happy!

    Thanks goes to my colleague Jimmy Benandex who helped in making the above PowerShell command. As he mentioned there are better ways of doing the matching but I consider what we produced as a good enough solution :)

  • UE-V and Enterprise Mode in IE11 not working well together

    Posted on March 5th, 2015 By Andreas Stenhall + No comments

    Consider the following scenario: A user has a Windows client running UE-V (User Experience Virtualization) and IE 11 and everything in regards​ to Enterprise Mode in Internet Explorer 11 is working fine. The user then gets a new machine or logs into another machine let it be a client or for instance Remote Desktop session and then Enterprise Mode in IE11 does not work at all. The URL:s defined in the Enterprise Mode XML ruleset file are not applied when the user browse a web application defined for Enterprise Mode.

    The problem is a consequence of UE-V roaming the Enterprise Mode registry key HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Enterprise Mode where it lists CurrentVersion with the current version of the XML file that is being used. So basically that means that Enterprise Mode think it has already applied the current ruleset although it has not.

    Solution / Workaround

    The workaround to prevent this scenario from happening is to exclude that registry key from being roamed. In the MicrosoftInternetExplorer2013.xml file scroll down to <Application> <Name>Internet Explorer 11</Name> and add an additional exclusion to the other exclusions already listed under <Registry>:


    For users that are already affected by the problem one must delete the registry key mentioned above and make sure that it is not synced back from the IE package in the SettingsPackages location (MicrosoftInternetExplorer.Version11 package).

  • Roaming Outlook email signatures with UE-V

    Posted on September 24th, 2013 By Andreas Stenhall + 1 comment

    Today I held a presentation at the Swedish System Center User Group client day on topic Microsoft User Experience Virtualization (UE-V) and its integration in ConfigMgr 2012 R2. Great to see such interest in UE-V! Afterwards, the most common question I got was “Does UE-V roam email signatures for Outlook?”. Well, the answer is yes, but there is a big “BUT”!

    UPDATE May 14th 2014: UE-V 2.1 (currently in beta) include a template fix for this for Swedish and Dutch but still there might be issues for other localized versions of Office. If you are still on UE-V 1.0 or 2.0 you find a UE-V template for roaming the Signature for Swedish Office at TechNet Gallery.

    UE-V does roam the email signature but you have to manually set the signature as default in Outlook options > Mail > Signatures when logging into another machine or after reinstalling your own machine. And, there is an issue if you are using a localized version of Office. First an example of how the Outlook email signature is actually roamed when switching to another machine, but note that you must choose to make the email signature “active” on the other machine.

    So this is in Office 2010 on a Windows 7 machine. Note that I have set this email signature to be active for new messages. 1980110714567

    And after logging onto a Windows 8.1 machine, the email signature did roam with me, but I as a user must make the email signature active by selecting it in the drop down list for new and/or replied or forwarded messages.

    Problems with the default templates for localized Office versions

    If you are running a localized version of Office you must manually update the UE-V templates to accomodate for localized folder names. The rule as specified for roaming the Outlook email signature in the UE-V template file MicrosoftOffice2010Win32.xml defines the following:

    <Path Recursive="true">Microsoft\Signatures</Path>

    This will save and roam all files (email signatures) in the users %APPDATA%\Microsoft\Signatures folder. The problem is that on a machine with a localized Office version, the email signature folder located in C:\Users\<username>\AppData\Roaming\Microsoft is not called “signatures” but instead localized to “signaturer” (as I am running a Swedish installation of Office).

    If you  have followed UE-V best practices and put your template files in a network share pointing that out using the UE-V GPO settings, you can just go ahead and edit the template file in the network location replacing “Signatures” with “Signaturer” in my example and the UE-V agents in your environment will by default pick up the new settings within 24 hours.

    This behavior is the default for both UE-V 1.0 (with SP1) as well as the coming UE-V 2.0 (which is now in beta). Note that changes might occur before UE-V 2.0 is released.

    UPDATE September 25th 2013: Microsoft has posted a KB article which explains more about why the mail signature is not set as default/active when roaming, see http://support.microsoft.com/kb/2889499/en-us.