Windows 10 survivor kit (2019 edition)

interface

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 about 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 in 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 changed. Or I learned what I did not know before. So here 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 images, like you would be used for Linux distributions. But now knowing this the next time I have to do it I will spare me 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, than 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 second browser. And guess what, ublock does now also exist for Microsoft’s default browser. Beside 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 as 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 can not understand why this is not available per 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 leaf a comment)

It is possible to install different languages, for example English, German, Swedish, and remove to 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 bi tedious, but in this way, you can change spell checker in edge between languages without changing the keyboard layout.

Text editor

This has change to last time. Today I live in VS Code, on all 3 platforms, Linux Windows and Mac. And I use it for everything, programming in C++, go, rust, ruby, python, shell/bash, …​ whatever, and to write text, like Markdown or Asciidoctor (in which this post is written).

Development environments

Visual Studio

Visual Studio Community, the setup let me fine tune what to install, want what not. For me it would be enough to just install the C++ compiler, but for the 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 use now Cmder, its great! Its 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 stared with Git for Windows, but just because I learned about installing it via scoop later. I will come to scoop in m 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 it 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 command to powershell, for example sourcing *.bat files, what 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 ore later I will do this.

WSL, Windows subsystem for Linux

I have Ubunut running on Windows, provided via the Microsoft Store. Just a wsl command away. If anything is an indicator for how things changed, than this!

Compared to various Cygwin and/or MSYS setups I had, this is great! Of course, the Windows integration can not 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 can not, 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

An other 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.

rust and go and python

Just installed them as the respective homepage recommends. Nothing special about that.

Of course, there are excellent VS Code plugins for each of these languages, so turning VS Code into a nice IDE for any of these languages works just fine.

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, good by message boxes.

I installed some programs with it and it works good. 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 be solved. vcpkg and scoop makes it easy to get everything what 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 on which OS I am. Of course, powershell is different than bash, but not that much. With Cmder as a terminal app, and WSL, plus all application 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 Liunx, but I think Microsoft has done a lot in the last years to be interesting again. I will be exciting to see where this journey will Windows lead to.

There are still some things on Windows that are a pain, for example I want utf8 per default for text, file names, everything. Or the always a virus scanner that slows down several things dramatically (compiling in WSL), even if the build in protection seems to bee pretty good in contrast to other solutions.
I have also experienced Windows developer installations which have been configured by IT department to total uselessness where nothing makes fun at all, and I guess such machines are the reason for a lot of critics.

But on a clean install, with all the new tools and possibilities available, Microsoft started to become interesting again. At least to me.