A blog with focus on Windows 10 and cloud <solutions
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.

    Problem

    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.

    Investigation

    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:

    <SettingsDocument>
    <file>
    <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.

    Solution

    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 :)

  • “The page can’t be displayed” in web apps after installing June (or July) CU update for Windows 10

    Posted on August 2nd, 2016 By Andreas Stenhall + No comments

    Some web apps might not work after installing the June (or July) 2016 Cumulative Update for Windows 10.

    Problem

    After installing June (KB3163018) or July (KB3172985) cumulative updates for Windows 10 a specific web app was broken, when browsing to it in Internet Explorer 11 or Edge lead to ”The page can’t be displayed”.

    Investigation

    Looking at the System log in Event Log showed Schannel errors:

    A fatal alert was generated and sent to the remote endpoint. This may result in the termination of the connection. The TLS protocol defined fatal error code 40. The Windows SChannel error state is 808.

    Doing a network trace showed that the web app server negotiated the TLSCipherSuite TLS_DHE_RSA_WITH_AES_128_CBC_SHA.

    Cause

    Windows as of update https://support.microsoft.com/en-us/kb/3061518 no longer support ciphers with 512-bits. Note that this KB was released in May 2016 but not anywhere stated to affect Windows 10. Nothing related to these changes points to Windows 10, but as we can conclude, these changes are introduced with June 2016 CU for Windows 10 (and thereby carried forward to July CU and any other CU to come).

    Workaround

    Use the workaround described in the registry section workaround in https://support.microsoft.com/en-us/kb/3061518 to go back to the 512-bits settings.

    Solution

    Make necessary server configuration changes to support the better ciphers.

  • MAP 5.5 (beta) gives you total control over IE migration

    Posted on November 14th, 2010 By Andreas Stenhall + No comments

    This week has been really intensive with a 5 day course on depoying Windows 7, including the MAP (Microsoft Assessment and Planning Toolkit). As always there were a lot of interesting discussions related to Internet Explorer, which many times casues problems when migrating to a later operating system. One of the major problems with IE migrations are that we have little control and historically had problems assessing the current IE, web apps or web browser status. The answer came a couple of nights ago, in the latest beta MAP.

    MAP 5.5 beta brings the possibility to inventory for which IE and third party browsers that are used in your organization, which default browsers are set but you will also see all activex controls and browser helper objects are being used, including a count number ith how many times for instance a particular activex control has been used. This is some really great information that will for sure help us in the migrating process when deploying Windows 7.

    Get your hands on the beta from Microsoft Connect.

  • Webcast on migrating from IE6 to IE8

    Posted on February 22nd, 2010 By Andreas Stenhall + 1 comment

    Join Chris Jackson in the webcast Migrating from Internet Explorer 6 to Internet Explorer 8 (Level 300) to learn what you need to know when you migrate from IE6 to IE8. Actually I met Chris at the MVP Summit that took place last week and he is indeed a great and inspiring speaker and an interesting person to talk to. What Chris doesn’t know about application (and web site) compatibility is not worth knowing :)

  • Fool a web site into thinking you are another browser or OS

    Posted on June 8th, 2009 By Andreas Stenhall + No comments

    Some time ago I wanted to see a soccer game via Canal Digitals web service but as I am running Windows 7 on my Media Center connected to my TV the web service discovered this and did not let me play this using Windows Media Player and instead offered me to view it in Flash format. Viewing the game in Flash format really wasn’t the best in quality and as I and my co-watchers discovered the game was more or less unwatchable.

    In halftime I had the time to do the necessary corrections to fool the web service into presenting itself as another operating system and Internet Explorer version. This made the Windows Media stream instantly and not to mention with much better quality. This is done easilty by changing the so called user agent string which is a string which presents certain information such as OS, web browser and version and some more info.

    If you want to change the user agent string and fool a web site or service into thinking it is something it is not you can do this using one of the registry fixes found at http://www.enhanceie.com/ua.aspx.

  • “Fix” the compatibility problems with IE8 beta

    Posted on May 26th, 2008 By Andreas Stenhall + 2 comments

    Some time during the third quarter this year the next beta of Internet Explorer 8 will be released. Microsoft is already asking people, webmasters specifically, to update their web sites to be Internet Explorer 8 compatible. IE8 follow web standards in a new way and this causes quite a few web sites to look not so good in Internet Explorer 8 native mode.

    Of course the best option is to make your web site follow the standards but in any cases where this is not possible, due to lack of time, money or knowledge there is a snippet of code that you can add to your web sites to make Internet Explorer 8 render them as if they were interpreted in Internet Explorer 7.

    The below snippet of code must be placed directly after the <head> tag.

    <meta http-equiv="X-UA-Compatible" content="IE=7">

    Adding this tag is equal to running Internet Explorer 8 in the “Emulate IE7” mode.

    More information: Your Web site may not display correctly in Internet Explorer 8 Beta 1