Scott Hanselman

Guide to Freeing up Disk Space under Windows 7

November 26, '11 Comments [50] Posted in Tools
Sponsored By

This is an "updated for Windows 7" version of my popular original article Guide to Freeing up Disk Space under Windows Vista.

I've got a 256 gig C: drive, but noticed that in the last week or so I'd had only 20 gigs free. Not cool and it was getting tight. A few hours later, I have 91G free. Here's how.

Warranty: There is none. Please read carefully and with all things you find on a random blog, be careful because you have no one to blame but yourself. However, if you take a few minutes, read carefully and do even a few of these tips or just run Disk Cleanup, you'll get lots of space back.

  • Win 7 SP1 Disk Cleanup - removing Service Pack Backup Files Clean up after Windows 7 SP1 (Service Pack 1) - After you install Windows 7 SP1, it leaves around the original files so you can uninstall the Service Pack if you want. After a few months with the Service Pack, I've decided for myself that it's a good thing and decided I don't need the option. In Vista there was a command line tool called "vsp1cln.exe" but in Windows 7 you can run Disk Cleanup and check "Service Pack Backup Files" and get back almost a gig of space.
    The only thing, again is that you can't uninstall SP1. Fine with me.
  • Disk Cleanup - It's amazing to me the number of people who DON'T run Disk Cleanup. It's even better in Windows 7. Just run it. Often. After you run it, run it again and click Clean Up System Files to get files that you need to be admin to delete.
  • Disable Hibernate - I have a desktop, and I prefer just three power states, sleeping, on or off. I don't use Hibernate. Plus, I have 12 gigs of RAM, and hibernation uses as much disk space as you have RAM. From an administrative command prompt, type "powercfg -h off" to get that space back. Got me back 12 gigs. It's up to you. Don't turn it off if you use the feature.
  • %TEMP% Files - Even though Disk Cleanup is great, sometimes for whatever reason it doesn't always get stuff out of the TEMP folder. I recommend you try to delete the TEMP folder. I do this from the command line. Open up an administrative console, type "cd /d %TEMP%" (without the quotes, of course). Then, go up one folder with "cd .." and type "rd /s temp"
    Do be warned, this command says to TRY to delete the whole folder and everything underneath it. It's very unambiguous. If you don't feel comfortable, don't do it. If you feel in over your head, don't do it. If it screws up your computer, don't email me. Next, I do a "dir temp" to see if the folder really got deleted. It usually doesn't because almost always some other program has a temp file open and the command can't get remove everything. If it DOES remove the folder, just "md temp" to get it back fresh and empty. This got me back 12 gigs. I'm sure you'll be surprised and get lots back.
  • Delete your Browser Cache - Whether you use Chrome, IE9 or Firefox, your browser is saving probably a gig or more of temporary files. Consider clearing it out manually (or use the CCleaner mentioned below) occasionally or move the cache from your browser's settings to another drive with more space.
  • System Protection for Local Disk Clean up System Restore - Windows 7 keeps backups of lots of system files every time something major (driver installation, some software installations, etc) happens, and after a while this can take up lots of space. It uses a service/subsystem called ShadowCopies and can be administered with a tool called vssadmin.
    Now, the EASIEST way to handle this is just to run Disk Cleanup, then click More Options and "Clean up…" which will delete all but the most recent System Restore data. That's what I did. That got me back lots of space back on my C: drive.
    You can also go to System Properties, then System Protection, then Configure and not only control how much space to allow for System Protection but also delete preview restore points as seen in the screenshot at left.
    Alternatively, you can use the vssadmin tool from an admin command prompt to to do important things. One, you can set a max size for the System Restore to get. Two, you can set an alternative drive. For example, you could have the D: drive be responsible for System Restore for the C: drive.
    You can use the commands like this. Note that you can put whatever drive letters you have in there. I ran it for each of my three drives. Note that this isn't just used for System Restore, it's also used for the "Previous Versions" feature of Windows that keeps some number of Shadow Backups in case you delete something and didn't mean it. Kind of a mini, local time machine. Point is, this isn't a feature you probably want off, just one you want kept to a max.
    Here's the command line I used. Your mileage may vary.
    vssadmin Resize ShadowStorage /On=C: /For=C: /MaxSize=15GB
  • SpaceSniffer 1.1.0.0 - www.uderzo.it Understand what's taking up all that space with SpaceSniffer or WinDirStat - I've used a large number of Windows Folder Size checkers, and the one I keep coming back to is WinDirStat. WinDirStat is actively developed, it's Open Source, and it works great in Windows. It's wonderfully multi-threaded and is generally fabulous. It'll help you find those crazy large log files you've forgotten about deep in %APPDATA%. It saved me 10 gigs of random goo. SpaceSniffer is also amazing and really lets you drill into what's going on space-wise in your disk.
  • Remove Old Stuff - Just go into Add/Remove Programs or Programs and Features and tidy up. There's likely a pile of old crap in there that's taking up space. I removed some Games and Game Demos and got back 5 gigs.
  • Uninstall anything evil - If you want to get a quick look at what's on a machine and uninstall LOTS of stuff quickly, look no further than NirSoft's My Uninstaller (download). Remove Toolbars (they think they need them and they never do and won't miss them), and anything that looks like it might destabilize their system. I check out toolbars, add-ins, etc
  • Wasteful TempFiles/ScratchFiles Settings in Popular Programs - Most programs that need scratch space have a way to set a ceiling on that Max Space. Go into Internet Explorer or Firefox, into the options and delete the Temporary Internet Files. Set a reasonable size like 250 megs or 500 megs. I've seen those cache sizes set to gigs. If you've got a speedy connection to the internet, that's just overkill. Check other programs like Adobe Photoshop and other editors and see where they store their temporary files and how large they've become. I used SpaceSniffer (mentioned above) and was shocked to find 5 gigs of old temp files from a year ago in little used programs.
  • A nicely compressed directoryNTFS Compression - That's right, baby, Stacker (kidding). This is a great feature of NTFS that more people should use. If you've got a bunch of folders with old crap in them, but you don't want to delete them, compress. If you've got a folder that fills up with text files or other easily compressed and frequently access stuff, compress 'em. I typically compress any and all folders that are infrequently accessed, but I'm not ready to toss. That is about 30-40% of my hard drive. Why bother to compress when Disk Space is so cheap? Well, C: drive space usually isn't. I've got an SSD, and it's small. I'd like to get as much out of it as I can without the hassle of moving my Program Files to D:. More importantly, Why the heck not? Why shouldn't I compress? It's utterly painless. Just right click a folder, hit Properties, then Advanced, then Compress. Then forget about it. As long as you're not compressing a bunch of ZIP files (won't do much) then you're all set. You might consider defragging when you're done, just to tidy up if you don't have an SSD.
  • Find Fat Temp File Apps and squash them - Google Earth and Microsoft Virtual Earth 3D are really fast and loose with the disk space. You can poke around for a while and next thing you know you're down 2 gigs or more. If you don't use the app a lot, delete the caches when you exit, or better yet, make the cache size for each app small.
  • Remove Crap with CrapCleaner (CLeaner) - This is a brilliant utility that removes crapware, unneeded programs, toolbars and other things that might litter up your machine.
  • works-on-my-machine-starburst ADVANCED: Use Junction Points/Hard Links/Reparse Points to move temp file folders - This is an advanced technique. If this technique kills your beloved pet cat, don't email me. You have been warned. Also, note that I'm only saying it works for me.
    I reclaimed 25 gigs just today by moving the MobileSync Backup folder from iTunes to a spinning rust disk off my SSD.
    Here's the idea. You'll move it to a drive with more space, but you'll LIE to iTunes using a little-used Windows Utility that will make a LINK between the folder iTunes expects to find and the folder you want your backups in. See? It's advanced but VERY powerful, especially when you
    C:\Users\Scott\AppData\Roaming\Apple Computer\MobileSync>dir

    Directory of C:\Users\Scott\AppData\Roaming\Apple Computer\MobileSync

    11/25/2011 10:10 PM <DIR> .
    11/25/2011 10:10 PM <DIR> ..
    11/25/2011 10:10 PM <JUNCTION> Backup [f:\iTunesMobileSync\Backup]
    0 File(s) 0 bytes
    3 Dir(s) 97,594,851,328 bytes free

While your are in there, why not do some more maintenance on your machine, blow out that dust and install some updates? Check out the The Technical Friend's Essential Maintenance Checklist for Non-Technical Friend's Windows Computer.

Hope this helps!

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

How to change the location of your iPhone backup and iTunes MobileSync Backup folder

November 26, '11 Comments [20] Posted in Tools
Sponsored By

worksonmymachine My C:\Users\Scott\AppData\Roaming\Apple Computer\MobileSync was almost 25 gigs and on a 256 gig hard drive, that's 10% and that's tight. I wanted to move it but there's no officially support way.

Here's a way. It's totally not supported and could totally screw up your computer, so you've been warned. Remember that you googled your way to this blog and I'm just a random guy. No warranty, Dear Reader. If you are reasonably savvy and you understand that this Works On My Machine, then we'll get along fine.

Here's the idea. You'll move it to a drive with more space, but you'll LIE to iTunes using a little-used Windows Utility that will make a LINK between the folder iTunes expects to find and the folder you want your backups in.

 

  • First, make sure iTunes isn't running
  • Now, move the C:\Users\(yourname)\AppData\Roaming\Apple Computer\MobileSync\Backup\ folder to your preferred location. My was F:\iTunesMobileSync. This is up to you.
  • Finally, start a command prompt as an administrator. You can do this from the Start Menu, type cmd.exe, then right click and select Run As Administrator. From the command prompt, create an junction point as I do below, just change f:\yournewfolder with your new location.
    • One thing to to make sure of, don't end up with a folder like f:\yournewbackupfolder\Backup\Backup, so be sure to check how your folders ended up when you moved them.
mklink /J "C:\Users\yourname\AppData\Roaming\Apple Computer\MobileSync\Backup" "f:\yournewfolder\Backup"

You should see something like this in Windows 7. Note the little "shortcut" overlay icon? That's saying this is a link.

 MobileSync as a Junction Point

You can also confirm it with dir from the command line. Note the <junction>:

C:\Users\Scott\AppData\Roaming\Apple Computer\MobileSync>dir

Directory of C:\Users\Scott\AppData\Roaming\Apple Computer\MobileSync

11/25/2011 10:10 PM <DIR> .
11/25/2011 10:10 PM <DIR> ..
11/25/2011 10:10 PM <JUNCTION> Backup [f:\iTunesMobileSync\Backup]
0 File(s) 0 bytes
3 Dir(s) 97,594,851,328 bytes free

If you are still on XP and not Vista or Windows 7, you don't have mklink, but you can use the junction utility in the same way.

Again, if these instructions don't make sense do you, I urge you to find a techie and please, be careful. You've been warned. That said, I've just opened up 25 gigs on my C: drive, so I'm happy.

Related Links

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

Five Absolutely Essential Utilities that make Windows better

November 18, '11 Comments [68] Posted in Tools
Sponsored By

Yes, I know I'm late in updating my Tools List. I know. Maybe this weekend.

Let me tell you about five tools that are so useful, so compelling and so "should have been built into Windows" that I now think of them as part of Windows. They are that useful to me. They make Windows better. They improve my workflow and then fade into the background. They are so stable and integrated that they have melted away and now feel as if they are part of Windows itself.

Bins by 1UP Industries

Bins was actually written by the same author as Fences, below, so you know it's awesome.

Animation of Windows 7 Taskbar icons jumping into a bin

It's actually ridiculously awesome. For example, I've got four browsers pinned to my Windows 7 Taskbar, which is kind of silly. Now, with bins, I can make a, *ahem*, "bin" and put four browser shortcuts in the space of just one regular icon. Then I make can choose a default program for the bin when I just click, or hover to get my others. All this functionality for $4.99, and he takes PayPal. Sold. Bins almost makes Windows 7 feel like Windows 7.1.

Fences by Stardock

I mentioned Fences here almost two years ago to the day and it's been running happily on all my Windows PCs ever since. I realize that some folks like a clean desktop but if you'd like to get those pixels working for you then I think you gotta put some icons on your desk. When they get out of hand, put a fence around them.

One of the best parts about Fences is that it's pretty smart about changing resolutions. Some people don't like a lot of icons because they fear the inevitable "give a presentation, change resolutions and lose all my icon positions" day. With Fences, this is not a problem. All your icons stay in their little boxes. They'll even rearrange magically if you change icon sizes.

Fences of icons resizing

Fences is truly a fantastic application and one that should be built in. The author of Fences and Bin is a programming god amongst men and I salute you, sir. The next taco is on me.

Window Pad by Lexikos in AutoHotkey

Here's a great graphic from Jim Priest's review of Window Pad that says what it does more clearly than I could. It's a multi-monitor aware window-moving tool. You use the Window Key along with the Number Pad to move windows around. Rather than spending time moving your windows with a mouse, you use the positions of the numbers on the number pad to move them.

It's Aero Snap taken to the next level. Rather than just left and right, there's nine positions per monitor that your windows can go, but because the positions correspond to the number pad you already know there's virtually no learning curve. WindowPad is brilliant and deserves to be in your Startup Folder.

How Window Pad works by Jim Priest

UltraMon Multi-Monitor Taskbar by Realtime Soft

I've used UltraMon as my Windows multi-monitor taskbar utility FOREVER. I purchased it in 2002 (that's a decade, kids) and it's been rock solid ever since.

There are a few other multi-monitor task bar utilities with Aero Peek and some other functions, but UltraMon is fast fast fast and I never think about it. It's never let me down for ten years.

Some real contenders are DisplayFusion from Binary Fortress and Actual Multiple Monitors. They are both actively developed and have more features and polish than UltraMon. I continue to use UltraMon because it's rock solid.

If you're serious about multiple monitors give them both a week of your time and pick one. You won't regret it.

DeskSpace by Otaku Software

I blogged about DeskSpace almost four years ago. I revisited it recently and it's not only in active development but it's gorgeous. Sure, there are other free Virtual Desktop managers out there but I challenge you to find one this polished, this gorgeous and this cleanly baked into Windows itself. It tends to use a bit of memory, but I'm willing to take the hit for the experience. DeskSpace is a beautiful, wonderfully functional piece of software and a fun and productive way to add multiple desktops to Windows.

P.S. One thing, Fences and virtual desktop systems don't always work well together so I keep the same desktop icons on each virtual desktop and change only the wallpaper. The Windows you choose to keep on different desktops stay there.

Amazing 3D Virtual Desktop Manager called DeskSpace

These five utilities should be built into Windows. But even though they aren't, they feel baked in and that's what really counts. Thanks you all, for making my daily Windows experience even better.

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.6 - Play

November 16, '11 Comments [7] Posted in Podcast
Sponsored By

PlayWhat 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.

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.6 "Play" 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.


Episode 2.0.4 - Taste

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.


Episode 2.0.4 - Taste

2.0.4 Taste

What is taste? What is style? Do you have it? Scott and Rob have no idea what it is or how to get it - but they know it's important. In this show they talk to a designer who flexxes his good taste for a living - and a developer who is committed to spreading good taste where he can.

Michael Bach Designer at Microsoft
Geoffrey Grosenbach Owner/Founder of PeepCode


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.

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

CSI: My Computer - What is netsession_win.exe from Akamai and how did it get on my system?

November 15, '11 Comments [70] Posted in Tools
Sponsored By

I know my system backwards and forwards and I do not like noticing stuff running in the background that I don't recognize. Recently I was checking out the Task Manager (right click on the clock, and select Task Manager or press Ctrl-Alt-Del and click Task Manager) and noticed TWO copies of "netsession_win.exe" running with a peak memory working set of about 25 megs. Ok, what's this? It's the Akamai Net Session Interface. Ick.

netsession_win.exe in my Windows Task Manager

You can always right click on suspicious processes and click Open File Location. This little tip is often enough to jog your memory and go, "Oh, THAT."

Open File Location in Task Manager's Context Menu

Hm, that dropped me into C:\Users\scottha\AppData\Local\Akamai. I know who Akamai is. They are a download accelerator used by lots of companies. Kind of the first large Content Distribution Network or CDN.

Am I sure it's them and not someone evil trying to fake me out? Right click on netsession_win.exe, then Properties.

Akamai's NetSession digital signature is legit

Well, they have a legitimate digital signature, interestingly they signed this on the 11th of November. Looks like this was recently installed automatically by something, perhaps Flash or Adobe Acrobat.

I wonder if someone needs to tell Akamai that their freshly installed service that just (kinda, a little) snuck on my system has a digital certificate that expires in 5 weeks. Are they or one of the companies that uses them going to update this client and cert soon?

Akamai's digital certiticate expires before Christmas

Running services.msc from Start | Run tells me that this runs as an Automatic Service. At least it's a Delayed Start so it doesn't slow down my boot.

Services (158)

The only thing I installed on my machine on the 11th was an automatic update to Adobe Flash. That's my #1 suspect right now as it's the only thing that I ran as Administrator that day.

For now, I'll keep it on my machine because it:

  • Is from a reputable (so far) company
  • Is known to be used by folks like Netflix, etc to speed up downloads
  • Has an uninstall available in Installed Programs
  • Feels legit
  • Has a control panel icon and a Read Me with lots of info about what it does (except who installed them)
  • Has a customer bill of rights online with details with test demo pages about their API.

I will say this, though. Whatever program installed it should have told me first before chaining it in. At least with Evil Toolbars I can see them. Not cool Akamai. Who installed you?

You're on notice.

UPDATE: Looks like this is using my own computers bandwidth to upload to other Akamai users. They're using our computers and network to make other people's uploads faster. That sounds like I'm running a Torrent and no one asked if it was OK. I'm continuing to dig into this, like disk space usage, etc.

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.