{"id":177,"date":"2023-07-04T12:20:52","date_gmt":"2023-07-04T19:20:52","guid":{"rendered":"http:\/\/www.barrybriggs.com\/blog\/?p=177"},"modified":"2023-07-05T06:28:53","modified_gmt":"2023-07-05T13:28:53","slug":"my-windows-11-journey","status":"publish","type":"post","link":"http:\/\/www.barrybriggs.com\/blog\/programming\/my-windows-11-journey\/","title":{"rendered":"My Windows 11 Journey"},"content":{"rendered":"\n<p>Barry Briggs<\/p>\n\n\n\n<p>Now, before I begin, let me say that first, this is not a rant about Microsoft, Windows, or anything. I\u2019ve used Microsoft operating systems since DOS 1.0 and worked for the Redmond company for nearly 14 years. I like Windows and love Office and Visual Studio.<\/p>\n\n\n\n<p>I work at home these days. As such I possess a variety of devices including my primary workstation, an Alienware i9 beast. I purchased this \u201cArea51\u201d model as they call it a few years back not so much because it targets gamers \u2013 I\u2019m not a gamer \u2013 &nbsp;but because I\u2019ve learned the hard way that the high end machine of today is just average tomorrow. (I had an i5-based Mac which became obsolete so fast it made my head spin.)<\/p>\n\n\n\n<p>Anyway.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">To Upgrade or Not to Upgrade<\/h2>\n\n\n\n<p>In October 2021, Microsoft released Windows 11 to largely tepid reviews. Few people cared, partly because it included very few, if any, compelling new features and \u2013 for some, worse \u2013 had strict hardware requirements that many machines could not satisfy.<\/p>\n\n\n\n<p>My beast did, in fact, meet the requirements. But it being my production machine, that I paid for, that I support, that I need every single day, well, let\u2019s say even though I\u2019m a pretty high-tech guy I\u2019m pretty conservative about \u201cupgrades.\u201d<\/p>\n\n\n\n<p>Time went on and I was happy with Windows 10.<\/p>\n\n\n\n<p>But over time the Redmond folks began to rumble about dropping support for Windows 10 and while that\u2019s probably a long way away, I began to consider upgrading.<\/p>\n\n\n\n<p>Yeah, well\u2026<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">My Rig<\/h2>\n\n\n\n<p>Before I go on, it\u2019s worth just mentioning my machine\u2019s (the cool kids call it a \u201crig\u201d) setup. As I mentioned, it\u2019s an i9 with 12 cores. It also sports some 64GB of RAM. For storage \u2013 and this is crucial \u2013 it\u2019s got a 256GB SSD for the C: drive, and well over 16TB on internal and external hard drives.<\/p>\n\n\n\n<p>Why such a \u201csmall\u201d C: drive? (I put it in quotes because I\u2019m an old guy and I remember when having a loud, power-hungry, full-high 100 <em>megabyte <\/em>drive in your PC exemplified the state of the art. I still have that drive in my garage.) <\/p>\n\n\n\n<p>Anyway, here&#8217;s why:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Users \u2013 especially gamers, whom these sorts of high-end machines target \u2013 want really fast boot, which SSDs give you.<\/li>\n\n\n\n<li>But byte for byte SSDs are super-expensive compared to hard disk drives.<\/li>\n\n\n\n<li>So they tend to be smallish, capacity-wise.<\/li>\n<\/ul>\n\n\n\n<p>In principle it wasn\u2019t that horrible an idea. Put all the system stuff on SSD-drive C: and your \u201cdata\u201d on another, slower drive (usually D:).<\/p>\n\n\n\n<p>But Windows never understood how to take advantage of such a (very common) configuration. Instead by default it puts everything \u2013 applications, data, Word files, Excel spreadsheets \u2013 in various locations on the C: drive. More on that later.<\/p>\n\n\n\n<p>Early on I recognized my skinny C:\u2019s limits and cleverly moved my \/Documents folder to a larger hard-disk drive. I figured \u2013 rightly \u2013 that I would never notice if my Word documents or Excel spreadsheets took 600 instead of 300 milliseconds to load. And that would make usage of my C: drive much more economical and I\u2019d always have room for whatever.<\/p>\n\n\n\n<p>Wrong. As we\u2019ll see.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">First Attempts<\/h2>\n\n\n\n<p>It had been a year since Windows 11\u2019s release and all my friends and all the cool kids were using it. Maybe, I thought, it\u2019s time.<\/p>\n\n\n\n<p>And Microsoft wanted me to. Really wanted me to. Every now and then when I turned on my computer in the morning it would display an incredibly annoying, full screen nag urging me to upgrade, with \u201cKeep Windows 10\u201d in very small print at the bottom.<\/p>\n\n\n\n<p>Which I always did.<\/p>\n\n\n\n<p>Until\u2026<\/p>\n\n\n\n<p>One day I succumbed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Not Enough Room<\/h2>\n\n\n\n<p>Over time my poor beast has accumulated many, many apps. I\u2019m a developer, so I have Visual Studio with all the fixings. Office, of course. Python. Visual Studio Code. Windows Subsystem for Linux, for a time; Docker and containers. &nbsp;I\u2019m a writer too, so Grammarly, Final Draft, Kindle tools.<\/p>\n\n\n\n<p>So on my first attempt \u2013 around about nine months ago \u2013 the upgrade process ran for thirty minutes or then told me I didn\u2019t have enough room on my C: drive. It offered a bunch of pretty useless suggestions about cleaning the drive \u2013 yes, empty the recycle bin, clear all temp files, blah, blah. (I could of course <em>compress <\/em>the C: drive but the compression\/decompression overhead would negate the whole point of an SSD.)<\/p>\n\n\n\n<p>Having work to do, I gave up for a while.<\/p>\n\n\n\n<p>Eventually I tried again. Realizing I was nowhere close, I took some radical steps. I uninstalled Visual Studio, a big disk hog, and reinstalled it on my F: drive\u2026good idea, but you can\u2019t install <em>all <\/em>of VS to another drive, just the IDE. All the libraries, assemblies, and a lot of other stuff still winds up on C:.<\/p>\n\n\n\n<p>Only 4GB available.<\/p>\n\n\n\n<p>Not enough.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">WTF Is Taking Up All the Space?<\/h2>\n\n\n\n<p>Around about now I began to wonder what the heck was actually using 252GB? It couldn\u2019t just be Visual Studio.<\/p>\n\n\n\n<p>Using Windows Explorer, sorting by size, turned up nothing. I\u2019d long ago moved or deleted those big home movie MP4s and such. No \u2013 I learned it wasn\u2019t about a few <em>big <\/em>files, but rather about the <em>vast quantities <\/em>of files. Zillions of them, a few megs here, a few there.<\/p>\n\n\n\n<p>But where exactly? Somewhere, there must be folders with huge numbers of files occupying huge amounts of space.<\/p>\n\n\n\n<p>Now, anybody who\u2019s done a <em>dir\/s <\/em>of the C: drive knows that even on a brand-new machine there are thousands and thousands of folders. Figuring out what\u2019s where is not something you can just eyeball.<\/p>\n\n\n\n<p>And to my shock, Windows does not have a utility that shows folder sizes \u2013 i.e., one that sorts folders \u2013 not files &#8212; by size. It doesn\u2019t even have an API (in .NET or Win32) to return folder size!<\/p>\n\n\n\n<p>Time to get serious.<\/p>\n\n\n\n<p>Time to write an app.<\/p>\n\n\n\n<p>So, <em>dirsort <\/em>is a highly inefficient, slow, but functional C# application that recursively goes through folders, adds up file sizes, and places the summed sizes in a sorted list.<em> [Edit: my friend Miha tells me there&#8217;s an open-source app called <a href=\"https:\/\/windirstat.net\/\">Windirstat<\/a> that does this. Who knew?] [Edit to the edit: And <a href=\"https:\/\/www.diskanalyzer.com\/\">Wiztree<\/a>&#8230;] <\/em><\/p>\n\n\n\n<p>I ran it on my C: drive.<\/p>\n\n\n\n<p>Good lord.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What a Freaking Mess!<\/h2>\n\n\n\n<p>What I found on my C: drive absolutely astounded me. I mean, speechless.<\/p>\n\n\n\n<p>Here are just some of the things I discovered.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">AppData<\/h3>\n\n\n\n<p>There\u2019s a folder called C:\\Users\\[YourNameHere]\\AppData. It\u2019s hidden, by the way. That\u2019s right, hidden. All told it contained about 80GB of files.<\/p>\n\n\n\n<p>Theory has it that \\AppData is just for temporary application data, as the name suggests. It\u2019s got three subfolders: \\Local, \\LocalLow, and \\Roaming. Local is data just for your PC, Roaming is data (like bookmarks) that can travel to any PC you log on too.<\/p>\n\n\n\n<p>Yeah, all that\u2019s pretty much BS in practice.<\/p>\n\n\n\n<p>Applications <em>install themselves <\/em>to AppData. Applications like Visual Studio Code \u2013 from Microsoft!<\/p>\n\n\n\n<p>There is an \\AppData\\Local\\Temp which they say you can safely clear. For me it held about 8GB, all of which I did delete. These were temporary files that in some cases dated from the late Jurassic. Not temporary.<\/p>\n\n\n\n<p>There\u2019s all kinds of other crap in \\AppData \u2013 who knows what it\u2019s all for. And it occupies nearly a third of my C: drive.<\/p>\n\n\n\n<p>Did I mention it\u2019s hidden?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Bad, Bad Developers<\/h3>\n\n\n\n<p>Look, developers. When you\u2019re done with a temporary file, delete it, goddammit. When you\u2019re done with your installer, delete it, goddammit. Delete your year-old app crash dumps, goddammit.<\/p>\n\n\n\n<p>All over the C: drive I found clutter. INI files, DMP files, files that are named with a GUID (fer cryin\u2019 out loud you idiots!).<\/p>\n\n\n\n<p>Clean up your messes!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">A Light at the End of the Tunnel<\/h3>\n\n\n\n<p>And then I found these two files at the root of the C: drive: swapfile.sys and hiberfil.sys. The swap file \u2013 ok, we all know what that is. Don\u2019t touch it.<\/p>\n\n\n\n<p>Now, my app found these but I couldn\u2019t see them in File Explorer or cmd. It turns out they are <em>system <\/em>files (not <em>hidden <\/em>files which are of course different).<\/p>\n\n\n\n<p>But what is hiberfil.sys? More searching\u2026and\u2026<\/p>\n\n\n\n<p>It\u2019s the file where Windows saves the contents of memory when it hibernates.&nbsp; (\u201cHibernation\u201d is different from \u201csleep\u201d and don\u2019t ask me what the difference is.) On my system the file occupied 26GB of disk \u2013 awesome, if I can get rid of it I can finally upgrade! Woo-hoo!<\/p>\n\n\n\n<p>So: can I relocate it to another drive? Again \u2013 if it takes three seconds to un-hibernate rather than one I really don\u2019t care.<\/p>\n\n\n\n<p>No. For some very strange reason you <em>can <\/em>move the swapfile to another drive \u2013 don\u2019t even think about it! \u2013 but not the hibernation file.<\/p>\n\n\n\n<p>Why? Who knows?<\/p>\n\n\n\n<p>However, you <em>can <\/em>safely delete hiberfil.sys! Yes! Go into the cmd prompt in administrator mode and type <em>powercfg -h off<\/em> which turns off all the hibernation machinery. Then reboot.<\/p>\n\n\n\n<p>Wow!<\/p>\n\n\n\n<p>Almost 30GB back!<\/p>\n\n\n\n<p>And\u2026I could install Windows 11!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Dear Microsoft<\/h2>\n\n\n\n<p>Yes, it\u2019s all about cloud and AI these days, I get it. Dear Microsoft, please don\u2019t forget about Windows.<\/p>\n\n\n\n<p>I have so many recommendations. Here they are in no particular order:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Please rationalize where you put apps. There\u2019s \\Program Files, \\Program Files (x86), three folders in \\AppData, \\WindowsApps, God knows where else. It\u2019s ridiculous.<br><\/li>\n\n\n\n<li>While you\u2019re at it, <em>Get Rid of \\AppData<\/em>. It\u2019s a mess. A huge one.<br><\/li>\n\n\n\n<li>Every few months start a background, low-priority job to clear out .tmp, .dmp, and other such crap files that are over a year old.<br><\/li>\n\n\n\n<li>When imaging a new system, if it has a small-ish C: drive and big D: drive, put non-performance-sensitive stuff on the D: drive by default.<br><\/li>\n\n\n\n<li>Please build a utility that displays a sorted list of folder sizes we know where all this crap is.<br><\/li>\n\n\n\n<li>Enable hiberfil.sys to be placed on an alternate drive.<br><\/li>\n\n\n\n<li>Talk to your developers, ISVs, MVPs, etc., and build a \u201cwell-behaved application\u201d checklist that includes best practices, like not using \\AppData. Enforce it.<br><\/li>\n\n\n\n<li>It should be possible to install any application <em>in its entirety <\/em>(looking at you, Visual Studio) on any drive.<br><\/li>\n\n\n\n<li>How about some better tools to deep-clean a C: drive instead of just suggesting emptying the recycle bin? &nbsp;<br><\/li>\n<\/ul>\n\n\n\n<p>Lastly, dear Microsoft, I remind you <em>I had to write an app in order to get Windows 11 to install.<\/em> An app. I had to write one. To get Windows 11 to install.<\/p>\n\n\n\n<p>Were I not a coder, the <em>only way I could get Windows 11 would be\u2026to buy a new machine!<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Was It Worth It?<\/h2>\n\n\n\n<p>I\u2019m only a couple of hours into Windows 11. I managed to successfully move the task bar back to the left so it\u2019s back to looking like Windows 10. I suspect everybody does this. <em>[Update after a day: I like the tabbed cmd.exe interface. I don&#8217;t like that Windows 11 lost my desktop images. And &#8212; worst of all but probably not surprising &#8212; I wanted to turn hibernation back on and &#8212; you guessed it &#8212; &#8220;There is not enough space on the disk.&#8221; Aaaargghhh!] <\/em><\/p>\n\n\n\n<p>Otherwise I really haven\u2019t noticed any difference. (I sure would like a Time Machine-like backup app, though, instead of backing up to OneDrive. But that\u2019s a story for another day.)<\/p>\n\n\n\n<p>I\u2019m one of the cool kids now, I guess.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Barry Briggs Now, before I begin, let me say that first, this is not a rant about Microsoft, Windows, or anything. I\u2019ve used Microsoft operating systems since DOS 1.0 and worked for the Redmond company for nearly 14 years. I like Windows and love Office and Visual Studio. I work at home these days. As &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.barrybriggs.com\/blog\/programming\/my-windows-11-journey\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;My Windows 11 Journey&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"episode_type":"","audio_file":"","cover_image":"","cover_image_id":"","duration":"","filesize":"","date_recorded":"","explicit":"","block":"","filesize_raw":"","footnotes":""},"categories":[9],"tags":[],"class_list":["post-177","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/posts\/177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/comments?post=177"}],"version-history":[{"count":4,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/posts\/177\/revisions"}],"predecessor-version":[{"id":183,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/posts\/177\/revisions\/183"}],"wp:attachment":[{"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/media?parent=177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/categories?post=177"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/tags?post=177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}