Archive

I have just removed a SATA hard disk from my old desktop computer and inserted it into an external case from Deltaco so that it could be used from a laptop. Unfortunatly it did not work straight away, no disk showed up in the File Explorer.

Slighty worried, I opened the Disk Manager and there it was shown as “Dynamic” and “Invalid”. Slightly worried, I started googling and found a solution that involved using a hex editor to modify a byte directly on the hard drive to switch it from dynamic into basic. It worked perfectly and the drive now works as expected. I’m not sure what the change means exactly but I’m very happy right now. It felt kind of hard core to use a hex editor to fix a problem like this, that does not happen every day.

Ever tried changing the font of a PowerShell console to Lucida Console, only to see the setting gone the next time you open the console? In that case, you’re not alone! I’ve been pulling my hair over this problem many times but today I decided to investigate it further.

There are several different solutions and none of them worked for me. For some people it helps if you set the font size to something other than 12 points, but not for me. For others it helps to start the console as administrator, but not for me. And here’s a strange thing: In a good old Command Prompt (CMD.EXE) Lucida Console works as a default font with no problem at all. It’s only in PowerShell console I can’t set it as default.A few of these tricks are discussed at superuser.com.

My problem turned out to be different as it was related to the regional settings of my Windows installations. The problem is described very briefly by a Microsoft support engineer here. Apparently Lucide Console “is not properly supported on CJK languages and other languages that are not localized by PowerShell (e.g. Arabic, Hebrew, etc.)”. It seems that Swedish belongs to the same category of languages that for some reason is not deemed compatible with Lucida Console. Strange thing is that it works perfectly when setting it on the console instance…

Anyway, to fix the problem all I had to do was to change my system locale to “English (United States)”:

Setting system locale to a language that is “supported” for Lucida Console solves the problem…

Voila, my PowerShell prompt is pretty everytime I open it, instead of using the ugly “Raster Fonts” which it falled back to before.

The problem description that Lucida Console is not compatible with all languages makes very little sense to me, but at least my problem is solved.

If you have tried running Windows 8 in Virtual Box (a great way to try out a new Windows version before taking the leap to install it as your main OS) you might have noticed that the only display resolutions available are in 4:3 aspect ratio.

“Windows 8 test” is the name of the virtual machine in VirtualBox and you can select any resolution you want. Restart the virtual machine if it’s running and after that the new resolution will be available in the Screen Resolution settings inside Windows 8.

Note that it’s possible to add several new resolutions to choose from by using CustomVideoMode1, CustomVideoMode2, etc. This can be useful if you want to move between monitors in multi-monitor setups. To do that in full-screen mode, press <Host>-Home which will show a popup menu where the display can be configured. <Host> is mapped to Right-Ctrl by default.

Sometimes it can be useful to retrieve the number of messages in an MSMQ queue, for example for monitoring. However, it’s not immediately apparent how to do it if you google it, so here are my thoughts on the subject.

The Get-Credential Cmdlet will display a login dialog which is fine in interactive sessions but if you need to set the credentials in a non-interactive script, then the tip in this blog post might help: PowerShell – How to create a PSCredential object.

Retrieving message counts from code takes a little more coding but here’s an example in C# that searches for a given queue and returns its message count:

Then why not try the Zune Desktop Theme for Windows XP? It’s designed to resemble the look of the Zune player, so I suppose its purpose is to inspire an interest in that device. Still, it looks quite good if you ask me:

Do you use the hibernation feature of Windows? Ever had any problems with it? I suspect that the answers to these two questions generally are the same…

Firstly, if you’re using Windows XP and have more than 2 GB of RAM, it doesn’t work. Fortunately there’s a fix. For more info, see here.

Secondly, you’re likely to have run into a host of other problems. My experiences include:

Hibernation works, but the computer is immediately awakened

Instead of hibernating, the computer is turned off

Instead of hibernating, I’m logged out to the welcome screen

All these are extremely irritating, of course. Fortunately I’ve found a solution to all my problems so far, namely a little known but excellent free tool called MCE Standby tool (MST) that helps you configure the hibernation options. If you have similar problems to mine, give it a go!

When you install the tool, it puts a small, green “power” icon in the system tray:

To configure the hibernation options, right-click the system tray icon, and the main window is displayed:

To fix my two last problems above, I changed Selected sleep state to “S3″, restarted the computer (might be unnecessary) and then changed back to “S4″. Voilá, problems gone.

If you have problems with the computer awakening immediately after hibernation then it might be a USB-connected device that’s waking the computer up (a mouse, keyboard, remote control receiver, etc). To fix this, you can select which deviced should be allowed to wake the computer up and this is done in the Devices tab:

Deselect all devices you suspect to be causing problems, and no awakening should occur. For me it was my keyboard.

There are more options in the useful little tool, but these are the ones that helped me so far. Give it a try if you have similar problems!

/Emil

BTW, “MCE” in the tools name stands for “Media Center Edition” indicating that hibernation problems can often be related to media systems. And indeed, many of my problems started after I installed Media Portal. My advice concerning that system is of course to keep away from it…