Scott Hanselman

Setting a Custom Icon for your External Drives in Windows Explorer

January 10, '12 Comments [25] Posted in Musings
Sponsored By

Ok, I like my icons. You arrange your desk perhaps, shuffle papers, I update things with totally unneeded icons. A while back I made, ahem, these awesome Visual Studio Command Prompt and PowerShell icons with Overlays because, frankly, pretty icons make life better.

I did these back in the day.


I even did a little one for the system menu, 'cause that's how I roll.


I just bought a nice 3 Terabyte Seagate USB3 External Drive that I'm very happy with, but I noticed that it had an awesome icon. This epic icon was was making my other drives jealous. This, of course, cannot stand, Dear Reader.

Ugly icons! Make it stop!

Easily fixed, friends.

Create a text file in the root of each drive called Autorun.inf with contents like this:


Any icon you like will do. You may need to reboot to see the changes. Now my externals are making my internals look bad!

Lovely Icons


About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Easy steps to a mobile-friendly responsive design with an embedded YouTube video and a fluid resize

January 6, '12 Comments [11] Posted in HTML5 | Mobile | Open Source | Speaking
Sponsored By

imageI recently did a video with Rob Conery on how to be a better technical speaker and blogged about it. I wanted to put up a site for this video to give people more details and to make it easier for me to get the word about about the video separate from Tekpub. I went and bought and fired up WebMatrix to do a quick one-pager.

The idea was to spend only an hour on this from the moment I got the domain to a "complete" site. My requirements were:

  • An easy to remember domain name.
  • A site that looks kind of like my existing site, to keep the branding cohesive.
    • Cool I've got some existing CSS.
  • Site should look good on mobiles and tablets so I want to use responsive design.
    • Um...
  • A site that includes the free trailer for my video that plays on any device, including phones and tablets.
    • Um...
  • A site that resizes cleanly, rotates cleanly and the video thumbnail is always as large as possible.
    • Um...

First step, a decent starter template that works on Mobile

For stuff like this, I now always started with a decent boilerplate. There's even group knowledge and experience that there's little reason for me to New Blank HTML File these days.

There are a number of options out there, including two of my favorites:

There's others, and the nice thing is that you can get started with a template like this in minutes, not hours, so go find one that makes you happy.

I picked Skeleton, then with a little magic help from Jzy and a late night Skype (go visit his site, by the way!) we brought in a few elements from my currently blog template so the general look and feel is still there.

Add a YouTube video

There's a number of ways to embed a video that will use Silverlight or Flash if HTML5 video isn't available, including

  • VideoJS - A really nice and image-free HTML5 video player with a series of templates that can make it look like Vimeo or YouTube or others. Works everywhere.
  • SublimeVideo - Free and pretty but they have a few sign up things if you serve hundreds of thousands of views.
  • jMediaelement or "jme" - Clean, basic, simple, open. Flash fallback and semantic code.

These are all great but if you've already got your video up on YouTube, Vimeo, Blip or another video sharing site, you might just want to make that existing video embed resizable.

For that, you can use FitVid, a small jQuery plugin that will take effectively any video element and make it resizable and usable in a responsive design.

Originally Rob was using a Flash player called Flowplayer but I recommended that he save money by serving his video trailers on YouTube. That meant that I could serve my trailer video from YouTube. While I could then use the FitVid JavaScript to make the video resizable, it seemed like overkill to use some JavaScript to resize something that CSS should be handling for me.

Enter A List Apart and their article on Intrinsic Ratios for Video. The hardish part about resizing a video is maintaining the ratio, like 16:9 for example. As they say:

padding-bottom: 56.25%
To create a 16:9 ratio, we must divide 9 by 16 (0.5625 or 56.25%).

Anders M. Andersen has a nice clean example of this with the CSS, so I ended up with this markup. Only the embed-container class matters in this context. The other containers are used by Skeleton.

<div class="container">
<div class="sixteen columns">
<div class="embed-container">
<iframe id='player' src="" frameborder="0" allowfullscreen></iframe>

And this CSS:

.embed-container {    
position: relative;
padding-bottom: 56.25%; /* 16/9 ratio */
padding-top: 30px; /* IE6 workaround*/
height: 0;
overflow: hidden;

.embed-container iframe,
.embed-container object,
.embed-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;

photoSo now, when you visit in your desktop browser or your mobile browser, you'll have a lovely experience.


I think I only spent about 2 hours total on this site. Taking advantage of existing CSS wisdom and standing on the shoulders of giants is absolutely the way to go for layouts. I'm totally sold on Responsive Design and am planning on including it on all my sites whenever possible.

Related Links

P.S. As an aside, if you bought the video, drop me a line if you liked it and maybe I can put your review on the site! Also feel free to write a review at SpeakerMix if you've seen me speak before.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Your Blog is The Engine of Community

January 5, '12 Comments [66] Posted in Blogging | Musings
Sponsored By

Photo by Steven Warburnton - Creative CommonsIn a time where there is much gnashing of teeth around the meaning of community, what being on the "inside" vs. the "outside" means, I want to take a moment to remind my fellow blog writers, blog readers, blog commenters what makes it all work.


Not a secret society or old boy's network, not a select few or someone knighted by The Queen. It's the nameless, faceless web search result that makes community work.

I search all the time for help on the internet. I find blogs, tweets, Stack Overflow, MSDN and more. More often than not when I find the answer I seek it's on YOUR blog, not mine. Often it's not on a big company employee's blog or that of the chosen few. The answer was put out on a blog, without ask of payment or recognition, by a 25-year old Persian student, or a 60-year old exploring .NET, or a high school student with a passion for open source.

I, and this blog, was that random search result for at least 5 of the last 10 years. Someone searches for help and finds my little corner of the internet. Write a few blog posts a week, with useful content, consistently, for ten years. Then write some more. All free, all because you feel good putting it out there.

I would encourage you all to blog more. Tweet less. Blogs are owned by you. They are easily found, easily linked to, and great conversations happen with great blog posts. The river of social media rushes on and those conversations are long forgotten. A great blog post is forever. Today's real-time social media is quickly forgotten.

Don't be a meme, but a movement.

Blog your opinions. Blog your cool project, or your latest useful function or library. Don't blog if it feels like work. Blog and get excited when someone comments. Often the comments are more fun and more useful than the post itself. Be passionate, but not rude. Point out failings, but suggest solutions. Organize. Invent.

Be constructive, be helpful, be kind. Make your blog posts not too long, not too short, not too stream-of-consciousness and not too terse. Remember your elementary writing classes. Have a thesis, make your argument, restate your thesis.

Share because you want to. Share because you want to help, but also because you want to help yourself. Share not for the recognition but for the love of teaching.

It takes a village, dear reader, to be a community. It's you, and me and no one in between. Now, go write, create, commit.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

This Developer's Life 2.0.7 - Dinosaurs

January 5, '12 Comments [18] Posted in Podcast
Sponsored By


You're so old! What a dinosaur! You're using old software and old languages to do old things! Or are you? Scott and Rob talk to David Sokol, Sean Bamforth and Pete Brown about Fortran, DataFlex and the Commodore 64. All these dinosaurs are doing useful work. Or, are they?

  • David Sokol Fortran Programmer and dude with an AWESOME hover state on his home page
  • Sean Bamforth Former Dataflex programmer and now beginning .NET guru
  • Pete Brown Senior Project Manager, Microsoft and budding Thomas Edison

I'd also like to encourage you to check out the last two episodes of This Developer's Life. We realize this isn't your typical podcast. It's not very technical, and it's not packed with information. We mean this show as an antidote to the usual technical talk shows as we try to dig more into issues and emotions that affect developers. We try to get to the center core of the developer and what makes them tick. Give us a listen and if you like the show, please review us on iTunes and Subscribe.

Download Episode 2.0.7 "Dinosaurs" here or listen online.

Also, please check out our last two shows you might have missed. We're very proud of how they turned out.

206-play2.0.6 Play

What do you do when you're not staring at your computer screen? What obsession grips you as you drive home? In this episode we ask David Heinemeier Hansson and Pete Brown this very question.

Episode 2.0.5 - Typo

2.0.5 Typo

Who cares about typefaces and why should you? Well, these guys do and you should start caring. Rob and Scott explore the world of reading online with one of the godfathers in the world of typeface and fonts.

In this episode we talk to Bill Hill, the bearded Scotsman who created ClearType and Geoffrey Grosenbach, notable typeface enthusiast.

I hope you enjoy the show as much as Rob and I enjoy making it.

Again, big thanks to DevExpress. The bandwidth and other costs are picked up DevExpress and CodeRush! Visit them and thank them on Twitter.


This Developer's Life is brought to you by CodeRush for Visual Studio.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Ten Things To Do to Secure an Important Person's Computer (or even Ashton's or a Kardashian's)

January 3, '12 Comments [25] Posted in Blogging | Musings
Sponsored By

I have a some friends and friendly acquaintances who are of some bit of note. Not Internet-famous, or even blog-famous like me, I mean actual famous. Like us, celebrities still have phones, Twitter accounts, Facebooks, laptops, hard drives, family photos and lots more that need to be managed. Maybe you're fancy also? Maybe you think you're fancy or just want to be?

Sometimes I spend time on Skype with my friends going through a list of things they need to do to cover their butts when it comes to their personal media and gadgetry. I thought I'd make up a list that I could send to them as it's become repetitive, then I realized that this stuff is important to all of us, not just folks on TMZ.

Apparently Famous People have Other People that tell them what to do, but it's unclear if the Other People actually know more than the Famous People. I know, Kim, you have no password on your Macbook and no encryption on your phone. Let's talk.

1. Find Your Phone - Make your cell phone "findable"

Find my phone!It flat sucks to lose your phone.

  • If you have a Windows Phone, you can go to to locate, ring, lock or even torch your phone. It just works and it's on when you setup your phone for the first time.
  • If you have an iPhone (or any iDevice, in fact) you can go to, sign in and locate, run, lock or wipe your phone as well. For offline phones, you can have it email you when the phone is found (turned on). You'll want to update your iPhone to iOS 5 and run through the initial wizard in order to confirm this is working for you.
  • There's a dozen or more choices for Android phones, but I suggest you check out either Plan B or Where's My Droid. A third good option that you could use on all your devices is Prey. Each of these will do what they need to. Find your phone.

Test your chosen Find My Phone technique before you go off losing it! Make sure all your stuff is backed up occasionally so you won't feel bad at all about a Remote Wipe (erasing your phone so the bad guys don't get it).

Add a Pin Number and Lock Your Phone

Next, DO Add at a Pin Number or password to your Phone. Having a phone that's unlocked already is just asking for trouble. You can always pick a simple 4 digit pin but pick SOMETHING.

Make an "If Found" Wallpaper

However, if you do use a password or pin and lock your phone by default, be sure to update your wallpaper to include contact info. I highly recommend the application If Found+ for the iPhone. It'll take your existing WallPaper and stamp a "If found, call..." or "Reward if found, email..." on your phone. Sometimes $50 and a phone number will get you your phone back quickly.

2. Don't be Trackable - Turn of Location Settings for specific apps on your Phone, Twitter and Facebook

You want to be able to find your phone, but you shouldn't give away your location when you talk online. Ever heard of They'll look at your Twitter account and see if you're giving away your location via FourSquare checkins and the like. The bad guys would love to break into your house when they can be sure you're not there. Broadcasting your location is a great way to make it easy for them.

There are many ways you can accidentally give away your location. First, in your Twitter profile. Early iPhone Twitter clients would update this field automatically with your exact latitude and longitude.

For example, here's a parody account that indicates it's not a real person. However, I can still tell where they are in the world...down to 6 decimal points.


Another way is to tweet and include your location, either on purpose or accidentally. Most Twitter clients have a "geotag" button now, but you may just want to turn that feature off completely by denying the twitter application access to your Location Services.

Also, don't be the mayor of your house. Foursquare recently started "blurring" the locations of what it believes are residences, but you can still give your location in general terms when you check into a home or residence.

3. Lock your Laptop - Secure your computer (desktop OR laptop)

I amazed at how few people even bother to put a password on their laptops. Yes, there's always a way to break a password or get information off a hard drive, but why make it easy for them? The main concern is that if you allow anyone to boot up your computer and run a web browser, chances are that you've clicked "Save Password" on your Facebook or Twitter or, even worse, your email. At that point you're dead.

Consider installing PreyProject on your machine. It can make it possible to track your laptop or desktop if it's stolen. There's been a number of times where folks have been able to track a thief in real-time and secure their belongings - while live-tweeting the whole event!

4. Encrypt it ALL - Secure your personal files and external hard drives

Here's an experiment that will scare the crap out of you. Use your computer's search function (upper-right corner on a Mac and lower-left on a PC) and type in your Social Security number. Go ahead, it's not going to the internet. See if you find some PDFs from your accountant or an old Excel file. Freaked out now? Now either delete it or put it somewhere secure.

If you have files with information you don't want falling into the wrong hands, consider using a tool like TrueCrypt to make an "encrypted volume." This is a single file that you can access as if it were a disk itself. You can make a "personal.dat" file of any size and keep your personal information inside that "disk inside a file." You can then keep that file in DropBox or another cloud storage system. With a strong password, these TrueCrypt files are VERY VERY secure.

If you have a technical friend with you, you can even encrypt your entire disk with TrueCrypt. Or, if you have Windows 7 Ultimate, you can "bitlocker" it, as I do all my drives. This way, even if a bad guy gets your laptop, they can't do anything with your drives. They are bricks without passwords and pins.

5. Don't Carry Your Life in Your Pocket - Encrypt USB Keys and "Jump Drives"

Some folks will take precautions with laptops and computers but then copy their whole life to a portable USB stick and put in their pocket.

Encrypt your portable drives

If you can, encrypt your files on your portable drive - again, with TrueCrypt or BitLocker.

6. Use Better Passwords - Make it harder, or use Pass Phrases

Using the name of your last movie or the street that you grew up on may seem like a clever password but it's not. A lot has been said online about password strength, so I won't belabor the point.

If you can, use a passphrase that's longer than a password, but easier for you to remember.


7. Super Secure your Email - Turn on 2-factor auth in Gmail

After you have a great password, if you've got a Gmail account for example that you REALLY can't have compromised, consider turning on "two factor authentication."

Hang in there, Kim. Sounds scary, but isn't. Two factor means, two things that you have or remember. A password is just one thing you have to remember. It's one factor. But two factors means a password plus something else. The second thing will be something you have.

You always have your phone, right? So why not make it so your Gmail account requires a password (that you know) and your phone (that you have).

  • To set this up in Gmail you go to using 2-step verification.
    • You can turn it on and give it your cell phone number. You can then install a small application that will give you a code that you'll use as your second factor when you log in.  "But, wait, that sucks! I don't want to do that every time I log in!" Don't worry, darling. You don't have to. You can tell Gmail to only require this code every 30 days.
    • If you have other services, apps, or maybe your phone's email that use your Gmail password these will suddenly think the password has changed because they don't understand two-factor auth. For these applications, you'll just give them their own custom password.
      • You go to manage application-specific passwords and get a password or two for your phone's mail or other apps that need Gmail access. The nice thing is that each app gets its own password so you can revoke them at anytime!

You can also tighten up your Facebook security by turning on Login Approvals. This is effectively two factor authentication as well. Facebook can SMS (text) you when you log in and then you type in the number they send you to confirm that not only do you know your password, you also have your phone.

8. Hide Where You Live - Make sure None of your Domains have your Home Address visible

Make sure if you own a domain that you've turned on Privacy or use DomainsByProxy or some other "WhoIs Privacy Protection." You don't want a fan showing up for dinner.

The WhoIs Record for

9. Secure Your Login - Turn on SSL/HTTPS for Twitter, Gmail and Facebook

If you find yourself in a Starbucks or on location a lot using strange Wi-Fi, you should probably make sure that your Twitter and Facebook accounts are using https (the S is for more Secure) by default. That's the same kind of encryption your bank uses. Just check your Twitter and Facebook accounts. You only need to do it once.

Here's Twitter:


And Facebook:


You can also Google more securely at or

10. If it starts with HTTP, it's probably public - BTW, TwitPics are Public

If you use a tool like TwitPic or any online photo sharing, or  - let's just be straight here - anything's likely public. If it has a URL, someone can get to it. Assume everything you do online is public.

I've personally watched a number of celebrities have conversations between each other on Twitter as if Twitter were a private chat. Just last month Charlie Sheen tweeted his phone number to Justin Bieber. So, he got a new phone.

Also, just an FYI. Don't take a picture of your pee-pee. There's just no reason for that.


This may sound like a lot, but it's simpler than you may think and it can be setup so that it's not invasive in your life.

The main points are these:

  • Make it so you can find your stuff, but others can't find you.
  • Use pins or passwords on your devices when you can.
  • Encrypt sensitive data in TrueCrypt files or Bitlockered drives.
  • Use "two factor" authorization for crucial services like email.

Feel free to suggest other tops I may have missed in the comments! And, perhaps pass this on to your Famous Friend.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.