Windows 10 survivor kit (2019 edition)
About 3 years ago I did the last installation of Windows 10 on one of my notebooks. Recently I had to do it again. To not forget some details I write them down, maybe in 3 years I will have to look them up ;-)
The motivation
The reason is the same as last time, a new notebook entered the house. It will be my Linux machine, and the previous main notebook will be my Windows box.
Last time a Thinkpad T460p was the new one, and the T430s got the Windows installation.
This time a T480 has arrived, so the T460p is now my Windows box.
The T430s will remain as a backup machine, it was long on duty with Windows 10 and also CentOS 7, and will still be used from time to time.
Since last time I did a Windows installation quite some things have changed. Or I learned what I did not know before. So here are some updates for what I think is needed to have a productive Windows developer machine that fits my needs.
Installation
Creating the install media
Making the USB boot image was the most time intensive part.
I wanted to install the latest Windows 10 version, which was 1903. So I downloaded the Windows 10 update 1903 iso, but putting it on USB failed with a non-helpful error message.
After some thinking I guessed that I needed to have a 1903 install for being able to make a USB install image with this version. And it was indeed the reason. A more helpful error message could have spared me some time.
For my T430 installation there is no 1903 update available, and the T480 was not updated to 1903 as it was shipped to me. I did not plan to run the update on the T480, but I did, and voila, now creating the Windows 10 update 1903 installation USB worked on this installation.
This means the image you can download from Microsoft is not a complete image, like you would be used to for Linux distributions. But now knowing this, the next time I have to do it I will spare myself some time.
The installation
The installation itself went without any problem. The existing Linux partitions have been removed and Windows 10 found its license somewhere in the BIOS (or UEFI). No problem with the installation itself.
User creation
When it was about creating a user I did as the last time, first create a local user with the name I want, then map this user to my Microsoft online account. This way my home directory is named as I want it and not with some random name Windows creates for me.
Getting some useful programs
Browser
Unchanged to last time, firefox.
But there are more and more sites that do not work anymore with Firefox, since they are optimized for Chrome. Some of them work with Edge, so I use Edge as a second browser. And guess what, uBlock does now also exist for Microsoft’s default browser. Besides uBlock there is also a plugin for my currently used password manager, and some other plugins. So Edge is not totally useless anymore. That is definitely an improvement over how it has been.
Keyboard layout
Unchanged to last time, I still need us-int-AltGr-NoDeadKeys to have the default US English keyboard layout, but can write German and Swedish letters without pain (altgr+q=ä, altgr+w=å,….).
I cannot understand why this is not available by default, as it is on each Linux distribution, or even the default, but at least I can download it from here. http://freeman2222.mywebcommunity.org/us-intnd.zip
(For my Mac OSX I still haven’t figured out how to get such a keyboard layout at all, if you know it, please leave a comment)
It is possible to install different languages, for example English, German, Swedish, and remove from all 3 languages the default keyboard, and add the us-int-AltGr-NoDeadKeys one as the only keyboard layout to each language. This is a bit tedious, but in this way, you can change spell checker in Edge between languages without changing the keyboard layout. |
Text editor
Development environments
Visual Studio
Visual Studio Community, the setup let me fine tune what to install, what to want and what not. For me it would be enough to just install the C++ compiler, but in case I get curious, I installed a bit more.
clang and clang tools
I find it super amazing that clang is available for Windows.
Terminal
I now use Cmder, it’s great! It’s also my default terminal in VS Code.
There is also a new terminal from Microsoft that can be installed via the Microsoft Store, but it is still beta.
git
I started with Git for Windows, but just because I learned about installing it via scoop later. I will come to scoop in a moment.
Make powershell in Cmder better
For having a __gitps1
style PowerShell in current git directory I installed posh-git.
Install-Module -Scope CurrentUser -AllowClobber posh-git
To be able to load traditional *.bat files, like you need to do if you want to have a Visual Studio developer prompt in PowerShell, I needed to install the PowerShell gallery
Install-Module -Scope CurrentUser -Name PowerShellGet -Force -AllowClobber
and then WintellectPowerShell tools.
This adds a lot of useful commands to PowerShell, for example sourcing *.bat files, which you need to do if you want to have a Visual Studio command line in your PowerShell.
Since recently, Visual Studio 2019 version 16.2, there is also a Visual Studio developer PowerShell.
There are still a lot of things I have to learn and understand about PowerShell and how it is supposed to work. But since there is PowerShell Core it could be that sooner or later I will do this.
WSL, Windows subsystem for Linux
I have Ubuntu running on Windows, provided via the Microsoft Store. Just a wsl command away. If anything is an indicator for how things changed, then this!
Compared to various Cygwin and/or MSYS setups I had, this is great! Of course, the Windows integration cannot be compared with MSYS or Cygwin installation, since those are native Windows tools, while WSL is more like a lightweight VM, but it does everything I currently need.
So all tools I cannot, or do not want to, run in a Windows version I run in WSL.
For example Ruby, to generate this blog post. And it just works. I like it.
As long as it is not about IO heavy stuff, WSL works good.
vcpkg
Another thing that did not exist last time I installed Windows is vcpkg.
This is a tool to get all 3rd party libraries I need to do my C++ development projects.
The main reason why I am on Windows is that I do multi platform C++ development and need to compile my code on all platforms (win/mac/linux).
vcpkg makes installing required 3rd party libraries easy and straight forward.
All the other applications
What about curl, cmake, doxygen, gimp, you name it, …
scoop it all
This is a very interesting tool I recently detected: scoop, a command-line installer for Windows. scoop has something like a port-system, called buckets, and provides all the software I need. This is great to automate Windows installations, goodbye message boxes.
I installed some programs with it and it works well. But for a final statement I have not spent enough time with it yet.
Summary
Getting required libraries and applications was a problem in the past, but this seems to have been solved. vcpkg and scoop make it easy to get everything that I need. What I prefer to run via Linux can be run via WSL.
This removes most of the big pain points I had in the past when I booted my Windows machine.
The fact that I live in VS Code makes me hardly notice which OS I am on.
Of course, PowerShell is different than bash, but not that much.
With Cmder as a terminal app, and WSL, plus all applications I use everywhere, the underlying operating system is nearly not visible for me anymore.
With VS Code, curl, gimp, Firefox, Davinci Resolve, … I have my set of apps that run on Linux, Windows and Mac.
Of course I feel most at home on Linux, but I think Microsoft has done a lot in the last years to be interesting again.
I will be excited to see where this journey will lead Windows to.
There are still some things on Windows that are a pain, for example I want UTF-8 by default for text, file names, everything.
Or there’s always a virus scanner that slows down several things dramatically (compiling in WSL), even if the built-in protection seems to be pretty good in contrast to other solutions.
I have also experienced Windows developer installations which have been configured by IT departments to total uselessness where nothing is fun at all, and I guess such machines are the reason for a lot of criticism.
But on a clean install, with all the new tools and possibilities available, Microsoft started to become interesting again. At least to me.