Windows 10 PC stuck in BitLocker loop (and recovering details of open tabs in the Edge browser)

I try not to reboot my PCs too often – frankly I thought I’d left the days of daily reboots behind with Windows 95 – but, faced with a display driver bug on my Surface Pro 3 (that seems to be triggered by the Azure Portal), a change of password that led to repeated authentication prompts (and OneDrive refusing to sync), together with some software updates pushed to my PC from SCCM, I had little choice this afternoon.

Unfortunately that “quick reboot to get things working again” turned into a disaster, with an hour long support call, followed by a desperate attempt to recover the last few hours’ work.

Stuck in a BitLocker loop

After rebooting, I found that a Windows 10 update hadn’t properly applied. Each time I entered my BitLocker PIN, I was faced with a message that invited me to use the BitLocker key to recover my PC. My IT support team gave me my key… and then after a restart we went round the loop again. We tried hard resets, turning the TPM on and off in the BIOS and more, until I found a TechNet wiki article that seemed to describe the issue (or at least something very like it).

To terminate this BitLocker recovery loop, I needed to suspend BitLocker from within the Windows Recovery Environment (WinRE). That’s OK, as long as you have the recovery key and, following the advice in the article linked above, I chose the “Skip this drive” link at the bottom of the page that requests entry of the recovery key, before selecting Advanced options/Troubleshoot/Advanced options/Command Prompt.

Next, I disarmed BitLocker using the following commands:

manage-bde -status c:
manage-bde -unlock c: -rp recoverypassword
manage-bde -protectors -disable c:

With BitLocker disabled, I hoped to be able to restart the PC and boot Windows, but unfortunately it was still not playing ball. I’ll be driving to the office on Monday for someone to take a look at my PC and I suspect a rebuild will be on the cards…

Work in progress

Despite the support team’s assurances that all of my data is on servers, I’m pretty sure it’s not. All of my data until I changed my password is on servers but anything since then has been failing to sync. If the sync engine can’t authenticate, I’m pretty sure I must be working from a local copy – which will be lost if the PC is rebuilt!

The items of most concern to me were some scripts I’d finally got working this afternoon; and any notes in OneNote.  I wrote last year about issues with OneNote and OneDrive (now overcome by doing it properly) but goodness knows where the unsynced changes are (again, I found a backup, but it doesn’t have the latest changes in it).

Again, using the WinRE Command Prompt, I backed up the files I thought were most likely to be missed. I tracked down the scripts that I’d finally completed and that had led to a few late nights this week (phew!) – and made a backup copy of my user profile, just in case.

The last worry for me was my browser. Forced by policy to use a Microsoft browser, I had lots of open tabs in Edge, as well as a few in Internet Explorer. The ones in Edge included the various posts I’d found that had helped me to complete my scripts – and I wanted to go back through them to blog about what I found…

Edge does recover sessions after a crash but, with a potential PC rebuild on the cards, I’m not sure I’ll ever get the chance so I tried tracking down the location of the recovery data.  Brent Muir’s fascinating look at Windows 10 – Microsoft Edge Browser Forensics told me where to find the recovery files (in %userprofile%\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\MicrosoftEdge\User\Default\Recovery\Active) but they are binary. Gleb Derzkij’s answer to a Stack Overflow forum post looked useful but I couldn’t get it to work.  What I could do though was open each of the (115!) .dat files in the Active Recovery folder using Notepad and see enough information in there to identify the URIs, then manually copy and paste them to a text file (ready to open when I’m back at my PC).

So that’s recaptured my work and the PC is ready to be completely razed to the ground if necessary. And the moral of the story? Never apply updates on Friday the 13th!

Short takes: checking your IP in Google; writing to a text file in PowerShell; and confirming which IE security zone a website uses in Internet Explorer

Another eclectic mix of snippets merged into a single blog post…

What’s my IP address?

Ever want to check the IP address of the connection you’re using? There are lots of websites out there that will tell you, or you can just type what is my IP into Google (other search engines are available… but they won’t directly return this information).

Writing output to a text file in PowerShell

Sometimes, when working in PowerShell, it’s useful to pipe the output to a file, for example to send to someone else for analysis. For this, the Out-File cmdlet comes in useful (| Out-File filename.txt) , as described on StackOverflow.

Internet Explorer status bar no longer shows security zone for a site

Last week, I was trying to work out which security zone a site was in last week (because I wanted to see if it was in the Intranet zone, whilst tracking down some spurious authentication prompts) but recent versions of Internet Explorer don’t show this information in the status bar. The workaround is to right click any black space in the website and select Properties. Alternatively, use Alt + F + R.

Check the security zone in Internet Explorer

Faster websites, better photography, a better browser, great conferences and a better life (#MKGN)

Last night was the fourth of the tremendously successful MK Geek Nights (MKGN), organised by David Hughes (@DavidHughes) and Richard Wiggins (@RichardWiggins).

And what a night it was.  Interesting and inspiring talks from great speakers, as usual – and I promised I’d write a summary blog post so here it is, albeit a little longer and a little later than planned…

Adventures with Google PageSpeed

Kier Whitaker (@kierwhitaker) kicked off the evening, with a few tips for speeding up websites:

  1. Make fewer HTTP requests:
    • Each JS or CSS file and every image is a round trip across the network. The fewer trips made across a congested network, the faster the page loads.
  2. Use Minify to compress and concatenate CSS and JS files :
    • Codekit is one option for embedding Minify in your workflow; there are command line tools too.
    • Consider using a master file with imports and then minify to compress the output (might not be so useful as an approach when working in teams).
  3. Optimise your images:
    • ImageOptim is one option – and even that 50-60-70% the images can still look great.
    • Apparently, Photoshop’s Export to Web functionality is not so good [damn!].
  4. Only use what you need:
    • When working with libraries, you don’t have to use all of Modernizr, jQuery, etc. – maybe just include the parts that you need (e.g. AJAX and not the whole library).
  5. CSS at the top, JS at the bottom:
    • This is a simplistic rule and you might need to break it sometimes (e.g. to stop a flash of unstyled type when using Typekit).
    • It’s about percieved speed rather than actual page loads [but perception is reality].
  6. HTTP compression:
    • Use GZIP compression on the server. On Apache this can be configured using .htaccess or in httpd.conf.
  7. Browser caching:
    • Make the browser keep a copy of the file – if only a page is only updated infrequently, you can cache for longer. Images, etc. can have long expiry but it’s not so great on dynamic sites!
    • Have a look at the HTML5boilerplate .htaccess file for inspiration – and read up on “cache busting”.
  8. Enable HTTP keep-alive:
    • By keep the connection open for a few more seconds, you can lose the overhead of additional requests.
  9. Cache dynamic content:
    • WordPress is quite heavy and can have 15-16 database queries on a simple home page. If you can cache the output then serve a flat file, this can save time.
    • Rails and many PHP frameworks have similar concepts.
  10. Use a content delivery network:
  11. Beware of boilerplates:
    • Boilerplates can leave behind a lot of unnecessary resources (e.g. favicons) – and these might even be downloading your 404 page if they are not present!
    • Check to see that all the assets you reference actually exist…
  12. Test widely:
    • Try a few sites to help optimise your code (e.g. Google PageSpeed; Yahoo Yslow; WebPageTest.org).
    • Kier likes the detail with WebPageTest.org and it provides two views – one for a fresh request and another to see how effective caching is.
    • Beware that the sites might contradict each other.
    • Also use developer tools in browsers, like the Google Chrome Inspector – look at the network tab and see when resources are loaded from cache, etc. (examine the headers too).

Once you’ve implemented a few tweaks, you might find that the last few percent to get to perfect are difficult – there are some things that you just can’t control. But, on a big website, incremental changes add up to big improvements – you might want a strategy to tray and work things out.

My site scores 84/100 on Google PageSpeed so it looks like I have some work to do…

Better photography by design

I’ve been taking photos for nearly 35 years and I’m still rubbish at it. Well, maybe not rubbish but I maintain there’s two sides to photography: anyone can learn the technical stuff; but, to create great images, you need to have a creative eye…

Al Power (@alpower) gave a great 5 minute talk on taking better pictures – not rocket science but some simple steps that everyone can take to get much better results.

“So, what makes a good photo?” asked Al:

  • Is it camera gear?
    • Not really, you can probably push your existing one. It’s often said that the best camera is the one you have with you… whether that’s a smartphone or a DSLR.
  • Composition plays a big part and Al showed four examples:
    • A skater: moving from left to right, gives a sense of motion. Leave some negative space for the skater to move into. And their legs and arms form triangles.
    • A spiral staircase: the shape and lines of the staircase lead the viewer into the picture. Repeated shapes and patterns work well.
    • A jetty: lead-in lines capture attention and bring the viewer into the image.
    • A beach: using the rule of thirds to divide the image into nine segments, and to place things on grid lines/intersections.
  • Try a different perspective:
    • Take the same shot from different angles, maybe three or four times. High or low, zoomed in or out – see what works.
  • Use the light:
    • Light is probably the most important control for a picture.
    • You can take great pictures in any conditions – but direct sunshine is not always good: perhaps place a subject under a tree in direct shade and use even, reflected light; on cloudy days sky is huge lightbox; the time of day makes a difference too
  • Learn how to process your pictures:
    • With a DSLR – raw images are amazingly powerful.
    • Use Snapseed on iOS and Android.
    • On a PC or Mac, use iPhoto, Picassa, Lightroom or Aperture.
    • Attend a workshop, watch some of Adobe’s videos, or a find a good YouTube channel.
  • Practice and look for inspiration:
    • Henri Cartier-Bresson was quoted as “your first 10,000 photos are your worst”.
    • No-one was born an amazing photographer and we’re on a journey – “give yourself permission to suck”, says Al – and practice.
    • Work out what tricks are employed by those that inspire you – break them down and apply them to your own images.

A web developers guide to Windows 8

Martin Beeby kicked off with a self-deprecating video, for all of us Internet Exploder lovers:

Then he moved on to tell us about modern.ie – a website to help developers design for Internet Explorer 10 and see if and where the might be problems, if they are using out of date libraries, or vendor prefixes that are no longer required. One example of the tips included is this code to ensure that a responsive site really is responsive, making sure that it displays properly when running on the side of a Windows 8 display:

@-ms-viewport{width: device-width;}

There’s also advice on creating icons that will look good on a Windows 8 desktop – and a 3 month subscription to BrowserStack for cross-browser testing.

Moving past modern.ie, Martin explained that Windows 8 can run HTML and JavaScript apps locally – so web developers can be app developers too – and, of course, because this is Windows 8, we were encouraged to embrace touch…

I only wish that the video Martin wrapped up his talk with was available on the web (I’m told it will be soon)… if I ever see it again, I’ll tweet the link…

The value of conferences

I had high hopes for this talk – I need to convince my new boss’ boss that there is value in conferences. And there is – but Craig Lockwood (@CraigInWales)’s talk started out by talking about the costs…

  • The costs to the organiser: a venue; speakers (fees and expenses); marketing (lanyards, programs, promo codes for discounts, etc.); insurance (weather, speaker sickness, etc.); judgement (you can’t please everyone – someone will be unhappy); refreshments; and time.
  • The costs to the speaker(s): time (to write a talk); judgement (what might others say they think of you?)
  • The costs to the attendee: ticket costs; travel; accommodation; and time

So what does this mean? Why do we need conferences? After all, Craig exclaimed, plumbers don’t get together to discuss latest pipe techniques! Our techniques and even the canvas we work on changes too regularly to keep up so we share information. Freelancing can be a lonely job – so meetups are great to build relationships and share knowledge.

Twitter, suggests Craig, has become the watercooler and conferences are the parties. Of course, some idiots still spoil things and some conferences find that they now need codes of conduct! So be respectful – it’s fine to disagree (respectfully) – but we should air our grievances personally and not publicly [Hmm… I once blogged about a pretty awful vendor event… think I might be guilty there].

But think about this quote too, attributed to Ling Valentine (@LINGsCARS):

“If nobody hates your website, chances are nobody loves it either.”

“I have no idea what I’m doing”

The final talk was from Simon Collison (@colly) and I just can’t do it justice in written form. Listen to the audio and then think about your own life and what you’re doing right now:

This hit home for me: I’m just starting a new job; it’s going to be a challenge – but that’s exactly what I need. As for keeping up with blogs, tweets, magazines, books – I’m drowning. And don’t get me started on the systems I use at work (admittedly not quite as chaotic as the setup Simon describes at Fictive Kin…)

So when does this happen again?

The next MKGN is on 13 June and all 200 tickets “sold out” in just 2 hours (can a free event sell out?!). There’s a waitlist in operation and it’s definitely worth signing up if you’re in the area and you are interested in webby-creative-designer-digital-makery-slightly-geeky-stuff, washed down with a beer or two and followed by pizza! I’ve even met some people there in real life that I only knew on Twitter before…

Embedding Windows Media in a SharePoint website

A few weeks ago, I found myself standing in front of a green screen in a meeting room that had been “converted” into a temporary film studio, recording a video for internal communication on the technology standardisation initiatives I’ve been running for the last few months.  After all the edits and final approvals, the videos are now coming online and, as “Chief SharePoint Officer” for our team (I jest), it was up to me to hack our portal and get them online.

I figured that the guys in our internal studio must have done this before and, sure enough, the advice I received was to use JWPlayer for Flash content or to embed a media player for Windows Media files. We went with Windows Media (I can play the WMVs offline too), so I used a method described on Stack Overflow to embed an object inside a SharePoint Content Editor Web Part.

I’m sure that there are alternatives that provide better cross-browser support but as this is a SharePoint 2007 website, the only browser that will be used is some variant of Internet Exploder (and our corporate browser is Internet Explorer 8) so not too much to worry about.

I needed just one slight variation.  The videos I used were 480×270 pixels so, with the controls, I needed the player to be slightly taller. Playing around until I had no black bars around the video got me to the following code:

A full-quality download of this video is also available.

Internet Explorer crashes when editing lists in SharePoint datasheet view

Recently, I found I was experiencing issues when editing lists in SharePoint.  After switching to datasheet view, Internet Explorer displayed a message which said:

Internet Explorer has stopped working

Windows is checking for a solution to the problem…

then:

A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.

IE then attempts to reload before presenting a page that gives more information:

It seems that Windows Data Execution Prevention (DEP) detected an add-on trying to use system memory incorrectly, so I took a look at the DEP settings but everything seemed in order.

Eventually I tracked the problem down to cells that contained HTML code (for a dashboard that I created in SharePoint), being mis-interpreted as a malicious exploit.  I created a new view, minus the columns containing HTML and was able to edit without any browser crashes.  It’s a bit of a nuisance but it seems to work…

Given the choice, I wouldn’t be using Internet Exploder anyway but, as this is SharePoint 2007, I don’t have a lot of choice (I understand that cross-browser support is a lot better in later SharePoint releases).

McAfee, Internet Explorer and a lack of quality control at Toshiba

Last week, I wrote about helping my father-in-law to ensure that the insurance company wasn’t fleecing him whilst replacing his stolen laptop.  His new machine (a Toshiba Satellite C855-12G) arrived this week (although it appears to be a discontinued model, which is presumably the reason it was discounted…) and I’ve spent part of the evening on family IT support duty getting it set up for him.

Unfortunately, I also found that the webcam is faulty (at least, neither Toshiba’s webcam application, Windows Device Manager nor Skype can see it, despite having downloaded the latest drivers from the Toshiba website), suggesting that Toshiba’s quality control is pretty shoddy (this doesn’t appear to be an isolated incident – see link 1, link 2, link 3). Back in the day, Toshiba was a respected notebook PC brand but I guess I should have insisted on Lenovo, Samsung or Dell…

Anyway, the real purpose of this post was to record some of the issues (and resolutions) that I found whilst removing the “crapware” from this new PC. To be fair, I’ve seen worse and the main thing to remove (apart from a non-English version of Windows Live Essentials) was McAfee Internet Security.  It never ceases to amaze me how many people will shell out cash for this type of application when there are perfectly good free alternatives, so I replaced it with Microsoft Security Essentials.

Unfortunately the McAfee uninstaller wouldn’t run, displaying an Internet Explorer-esque “Navigation was cancelled” screen (but without any chrome).  As Skype was also having problems adding contacts, I started to suspect something was blocking web traffic and that hunch turned out to be valid. Disabling Internet Exploder 9’s Content Advisor did the trick. How anybody can use it is beyond me (I had to enter a password four times  just to switch from Windows Update to Microsoft Update) but, once Content Advisor was disabled, both Skype and the McAfee uninstaller worked as they should.

 

 

Useful to know: Google Chrome has its own task manager

Earlier today, I was wondering why I was seeing a “missing plug-in” message in Google Chrome on a number of websites that I regularly view. I loaded the same websites in Internet Explorer and they worked OK, so something had obviously gone screwy inside Chrome. I could have guessed – it was Flash, although normally I get a yellow bar to tell me that has stopped working.

I rebooted my PC yesterday, so I don’t plan to do that again for another couple of weeks (until the memory leak that one of my apps has gets so bad that I’m forced to…) but I googled missing plug-in google chrome to see what comes up. As it happens, Chrome has a task manager built in (press shift and escape).  After ending the Shockwave Flash process, I refreshed the offending page(s) and everything worked as it should.

By then I was intrigued by the stats for nerds link which takes me to chrome://memory-redirect/ – an internal page that contains a breakdown of activity by process (including which tabs are managed by which processes) – which would have been handy to know about when Chrome had gobbled up a good chunk of my RAM earlier this week:

Any tips for restricting Chrome's memory usage? Running ~60-70% CPU and ~80-85% RAM on a 4GB Windows x64 system: http://t.co/dDMehXbN
@markwilsonit
Mark Wilson

If anyone knows a similar memory management function for Internet Explorer, I’d be pleased to hear it as the relationship between tabs and processes seems to be a black art (and it may help to chase down problematic tabs) – I’ve tried Process Explorer and Windows Task Manager in the past, but it would be useful IE functionality…