My take on Windows 8

Last week I had some days of free time so I decided to upgrade my Windows 7 computer to Windows 8. I had received a free copy from Dreamspark premium (trough my university) so I thought: Why not? I had some problems with my old SSD being too small (an OCZ Vertex 2 60GB) and filled up a lot even though I tried keeping most software and data on my HDD (some stuff required to be installed or install components on C:, like visual studio). After taking the wrong bus and traveled for 4 hours (that’s another story), I managed to buy a SanDisk Extreme 120GB SSD. I live in a town with few hardware stores and that was the best I could get my hands on without ordering something online and waiting for it to shop.

My current system spec are:

  • CPU: Intel i7 950 3.06GHz
  • Motherboard: Gigabyte GA-X58A-UD3R
  • RAM: Corsair XMS3 Vengeance DDR3 PC12800/1600MHz CL9 3×4 (12)GB
  • GPU: Kfa2 GTX 570 1280MB
  • SSD: SanDisk Extreme SSD 120GB (550MB/s read, 510MB/s write)

(I kept the OCZ  Vertex 2 60GB and the 250GB HDD)

Windows 8 Installation

The installation went really smooth. Nothing different really from the Windows 7 installation, just a lot faster but maybe that’s because the new SSD. It was done in some 10 – 15 minutes (I thought it would take longer, so I had planned to clean my apartment for once when I’m without a computer, but I guess that’s for another time).

The post-install was really smooth. Everything worked perfectly from the start and most of the drivers were automatically installed trough Windows Update. The only thing I had to install myself was the (awful) Logitech Gaming Software to be able to configure the macro buttons on my keyboard, mouse and headset.

After that was done, I had to install my software again but it wasn’t something special about that, just the same stuff you do on every os.

The new UI

The new thing, as probably everyone know by now, is the new UI. When I see people talking about Windows 8, it is mainly about of how awful, bad and table-centered the new UI is. I disagree with this. Ever since I got Windows 8 I’ve had much more fun using my computer than before. Sure, it takes a bit of time to figure stuff out, but once you do it’s really easy to use.

The metro interface

The new UI

A lot seems to be annoyed with the missing start button in Windows 8, but in reality, metro is the new start button and it does pretty much what the old start button does. It lists all your installed programs, but it also displays apps and widgets. You can still start typing to open the application you are looking for, no need to look trough all tiles for the app you wanted.

The hover bars

The left hover bar

The left hover bar

The hover bars are the bars that popup when you hover the left or right part of the screen. The left one contains the start button and all running windows store applications, and normally desktop (desktop applications are still in the taskbar when in desktop mode). It’s pretty straightforward. The right bar contains functions like a search button, settings, sharing and such.

A problem I’ve discovered is that it can be rather hard to open the bars if you have multiple screens as me. Luckily my main screen is 1080px high while my secondary is only 1024px high so I get some space in the top-right corner where the mouse cannot travel to the other screen, but if it were screens with identical resolution it would be rather hard to get the menu open.

The right hover bar

The right hover bar

Windows App Store

I think it’s decent but it needs some work. The first thing I had issue with was: how do I search? The search button is placed in the right hover bar and I know it’s meant to be the same location for each app, it’s nothing you remember easily. Then add in the difficulty to open it if you have a second screen on the right side. Win+F seems to open file search and from there you can select to search in the app store and such you don’t have to hover the bar, but still cumbersome.

The windows store

The windows store

Next issue was a setting “Find it easier to find apps in my preferred language” that was on by default. A more accurate name for that setting is “Exclude all apps not in my language”. There was just a dozen apps in Swedish and I was confused why I couldn’t find stuff.

Other than that, there isn’t much to say really.

The plex app

The plex app


In my opinion Windows 8 was a worthwhile upgrade from Windows 7. It’s fairly easy and fun to use and there are a lot of new possibilities. I might just even try creating a few apps, it looks interesting so I have to decide on what I should create.

Python: Getting the title of windows, getting their processes and their commandlines using ctypes and win32

My latest assignment for Commie was to create a plugin for xchat to list running encoding processes in the staff IRC channel. You can write plugins in a few various languages and me knowing a little bit of Python I chose to do it that way.

The problem I was facing was to find all windows of x264, fetch their titles (which included how far the encoding was, time remaining etc), and output each title to the channel when a user would say “.encoding”.  Easy enough, I thought, I’ll just fetch all processes and check if “x264” is in the title. I found some methods and code snippets using pywin32 (win32gui, included in pywin32). Unfortunately, xchat only supports Python 2.6 (which is a rather old version of Python) and the windows installer for pywin32 for Python 2.6 is broken and I didn’t manage to compile from source either, so I had to find an alternate way of doing it without any libraries.

Luckily, I found a way of getting all windows titles using ctypes (which is included in Python by default) and the win32 API (thanks to this blog post). It worked really well and from there I managed to easily get the titles I wanted and send them to the IRC channel. Unfortunately, the titles didn’t contain what was encoding, so it would be pretty useless to know that something is 50% done.

Looking around a bit, I managed to find a way to get what was being encoded. The commandline of the process that started the encoding included the directory name of what was encoding. Now I needed to somehow fetch the commandline, but I only had a window and not a process. Having the window I obviously had the window handle. By reading some documentation I found the GetWindowThreadProcessId, which returns a process id from a window handle. Now that I have that, how do I easily get the CommandLine? The easiest way I could figure out was to use WMIC, a commandline interface to WMI (a type of query language to fetch various stuff from the OS, something in the lines of that). From this on it was only some formatting left to do. Below is the full code. Hopefully others can use it to understand how it works, as I had some troubles searching for the right way to do this (all thought it may be a rare thing to do).