Archive

Archive for the ‘Windows’ Category

Windows 10 update issues

With Windows 10 there is no easy way to block an update. If Windows Update thinks you need it, well then there you are. Perhaps that is good, perhaps it is bad. I don’t like it. However, it turns out to be particularly nasty if an update fails!

In my case the printer driver for HP LaserJet CM1415 had a new version, but the update consistently failed. Not a big deal, the old driver worked well – or so I thought. Unfortunately the failure to install this one update caused Windows Update to ignore all others. It would keep trying with the printer driver every and keep failing. As a result none of the really important updates got through. So, if an update fails, don’t ignore it.

When that had been solved the Anniversary Update started, but consistently failed with a black screen. It took me some time to determine why. Apparently it didn’t play well with TrueCrypt (Windows Home does not support Bitlocker). Decrypting the drive for the update solved the issue.

Advertisements
Categories: Windows

Microsoft finally got something right, bash on Windows!

I’m still on Windows 7. It was a great OS. It is becoming less great with nagging and spying upgrades from Microsoft, but it works well and I hated Windows 8. Windows 10 seems a bit better, but it is still inferior to Windows 7 in my view. Or was until now! Finally Microsoft seems to have found a killing feature: native bash on Windows, supported by Canonical (Ubuntu). Read more in this blog. Perhaps it is time to upgrade?

Categories: Windows

Windows-like keyboard shortcuts in Linux Eclipse

I have worked with Windows as my main development platform since Windows 3.1 and the keyboard shortcuts are hardwired by now. Unfortunately Microsoft has failed utterly. In my opinion Windows 7 is the pinnacle from a usability standpoint, Windows 8 was a disaster and Windows 10 is not that much of an improvement. It is time to move on, in particular as Microsoft seems determined to spy on customers.

Java is cross-platform, so I can use Linux. It works well and bash is great, but the keyboard shortcuts are plain wrong. Fortunately there is a solution. For example, to expand a treeview in Eclipse StackOverflow recommends this for GTK 2:


binding "gtk-binding-tree-view" {
    bind "j"        { "move-cursor" (display-lines, 1) }
    bind "k"        { "move-cursor" (display-lines, -1) }
    bind "h"        { "expand-collapse-cursor-row" (1,0,0) }
    bind "l"        { "expand-collapse-cursor-row" (1,1,0) }
    bind "o"        { "move-cursor" (pages, 1) }
    bind "u"        { "move-cursor" (pages, -1) }
    bind "g"        { "move-cursor" (buffer-ends, -1) }
    bind "y"        { "move-cursor" (buffer-ends, 1) }
    bind "p"        { "select-cursor-parent" () }
    bind "Left"     { "expand-collapse-cursor-row" (0,0,0) }
    bind "Right"    { "expand-collapse-cursor-row" (0,1,0) }
    bind "semicolon" { "expand-collapse-cursor-row" (0,1,1) }
    bind "slash"    { "start-interactive-search" () }
}
class "GtkTreeView" binding "gtk-binding-tree-view"

And this for GTK 3:


@binding-set MyTreeViewBinding {
    bind "Left"     { "select-cursor-parent" ()
                      "expand-collapse-cursor-row" (0,0,0) };
    bind "Right"    { "expand-collapse-cursor-row" (0,1,0) };
}
GtkTreeView {
    gtk-key-bindings: MyTreeViewBinding;
}

With Ubuntu the files to edit are found below /usr/share/themes.

Categories: Java, Linux, Windows

Remove the “Get Windows 10” icon

Since I keep doing this for one Windows computer after another, here goes. Microsoft “helpfully” advertises the Windows 10 upgrade by installing a tray icon for Windows 7 and 8 users through Windows Update. It is annoying and it steals CPU cycles, so let’s get rid of it. There is a good explanation here, but in summary uninstall KB3035583 and then mark the update as hidden.

To uninstall from an administrator command prompt:


wusa /uninstall /kb:3035583
Categories: Windows

Chocolatey brings package management to Windows

Finally there is a package manager like apt-get or yum for Windows! Chocolatey can install and upgrade applications with simple commands, very similar to the Linux equivalents. For example, install the native Windows docker client with choco install docker and keep it up to date with choco upgrade docker. Highly recommended.

Categories: Windows

Resolve fatal error LNK1123 with Visual Studio 2010 and .NET 4.5

Recently I had to fix a bug in an old C++ application developed with Visual Studio 2010. My computer is newer, so it has .NET 4.5 installed. Guess what? Without any changes the code failed to build with:

LINK: fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

The problem should be fixed in SP1, but getting that installed was non-trivial without admin rights. Fortunately the issue can be traced to a single file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe. The wrong version is 31,048 bytes, the correct version (from SP1) is 31,056 bytes. The wrong version has a dependency to msvcr100_clr0400.dll whereas the correct version depends on msvcr100.dll. Replace the file (for exampel from another installation with SP1 installed) and the problem is solved! Much faster than patching, not to mention trying to revert from .NET 4.5 to an older version.

Categories: Windows

DRIVER_POWER_STATE_FAILURE blue screens with Alienware M17x

For quite some time I have had problems with my Alienware M17x when running on batteries. It is easy to reproduce. Every time I turn it off whithout external power connected it hangs and eventually crashes. Apparently I’m not alone in having issues with this model, but the recommended solutions vary greatly.

Finally I found a solution by following Dell’s instructions. It is possible to select PEG in the BIOS and disable the Integrated Intel HD graphics card and leave only the discrete NVidia GPU working. When I did that the problem went away. Apparently the driver failure is related to the Intel card.

The solution has one disadvantage: as the NVidia card uses more power the system drains the battery faster. I prefer that to the crashes, though.

Categories: Windows