Tag Archives: windows

Anything related to Microsoft Windows

VirtualBox corrupting VM metadata file

So after a recent update of VirtualBox from 5.0.20 to 5.0.22 I found that a Windows 7 image I have suddenly didn’t work anymore. Worse yet, everything was empty or reset to default values.

You can most likely recover from this by following these steps:

  • Close VirtualBox (although you might not want to until you safeguarded vbox-prev if you find out you don’t have a versioned backup file)
  • Go to the directory you have your VM files
  • In here look for your faulty image’s directory and cd in
  • Look for a vbox file with the same name as your image, but most likely containing a version number as the settings/metadata file got upgraded. DO NOT lose this file.
  • Run a vboxmanage list vms
  • Copy the UUID listed as inaccessible
  • Run vboxmanage unregistervm <UUID>
  • Copy the backup vbox file over the existing, wrong one
  • Run vboxmanage registervm /path/to/file.vbox
  • Most likely VBoxManage will error out with an error about a conflict with DVD images with different UUIDs (in my case)
  • Edit the vbox file, remove offending line (in the case of the DVD image, might be more difficult with other error cases)
  • Run vboxmanage registervm /path/to/file.vbox again
  • VBoxManage should now not error out
  • Start VirtualBox and your VM should be ok again

Of course the behaviour from VirtualBox is downright dangerous here. If there is such a conflict or error it should NEVER mess around with your metadata file and thus corrupt it. This is one of the biggest sins in software programming. Only after you successfully start an application are you allowed to write out any updates of settings files and whatnot.

Meld in TortoiseHg

I like Meld as a visual diff/merge tool. You can also use it as the default in TortoiseHg. Open TortoiseHg’s Workbench. Go to File » Settings, make sure the global settings tab is active. Click Edit File, if it doesn’t yet exist create a section called [extdiff], and under [extdiff] add cmd.meld = /path/to/meld. For Windows it would be something like cmd.meld = C:\Program Files (x86)\Meld\meld.exe. From the command line you should be able to use hg meld to get your diff shown in Meld.

Dead on arrival

So I bought a Western Digital My Passport Essential 500 GB external hard disk yesterday. Got home and plugged in on my Windows XP 64 box, USB triggers to find a new device, Windows churns, installs the appropriate support. According the documentation some virtual CD should start installing the appropriate software to use the advanced features (not that I will use them). But nothing happens. So I check disk management and see that it is there, as disk 8, with 2047 GB as size. Wait a second, it’s only a 500 GB version (Hint #1). Next I try updating the firmware from .30 to .32 and the application says it tried too often and failed (Hint #2). Then the downloaded software to manage the drive sees the drive, but cannot do anything with it (Hint #3). Trying from Windows disk management to initialize the drive in order to just format it gives the message that the drive is write protected (Hint #4). Listening to the hard drive yields the typical distinct sound of ‘ticking’ which is a clear indicator that the hard disk is most likely dead.

Time to return it to the shop and get a replacement.

Office 2007 Proofing and Input Method Editors (IME)

So I have been toying with the proofing tools and input method editors (IME) from Office 2007. The issue with the single language packs is that you cannot just group the entire stuff together.

Also trying to run the MSIs from the individual directories for the proofing tools or the IMEs greets you with an ‘Error 1713’. On the other hand, if you run the MSI from the command prompt and passing along LAUNCHEDBYSETUPEXE=1 as an argument it will install. Curious.

Office 2003, Visual Basic editor and AppLocale

So I was working with a Japanese .xla (Excel add-in) file. I needed to look at something in the source so I fired up the Visual Basic editor within Excel. Upon investigating the form and the various captions it turns out that the Visual Basic editor only displayed them in gibberish (typical decoding issues) or question marks (substituting the .notdef glyph for codepoints). So it seems the Visual Basic editor is either not multi-byte capable (typing directly a string in Japanese into the caption yielded question marks) or it is bound to the locale of the system.

I then remembered AppLocale and fired up Excel through it, setting it to think it is on a Japanese system. Then within Excel I proceeded to start the Visual Basic editor and, sure enough, the text was showing me the Japanese I needed.

I am not sure if I should find this lame or understandable.

UCHAR and SByte

Recently I have to do a lot of C# programming. It’s a quite ok language to be honest. I need to wrap certain unsafe code in C# code. Some of this unsafe code uses the old type UCHAR, which is defined as an unsigned char type with a limit of 0 to 255, inclusive. Perusing some websites to look for some marshaling information I actually find people recommending using the sbyte data type for this. This datatype (sbyte, SByte or the full System.SByte) is a signed 8-bit integer type. This means it has a range of -128 to 127. This is also extensively documented in the sbyte C# reference. So I am left wondering how well these programmers actually do understand their data types.

Macintoshes and PCs

I was pointing out to a friend of mine that for her new PC, or in this case a laptop to be more portable, she might actually consider a Macintosh. I think the Macintosh would, at least for her, mark an increase in productivity.

Instead of focusing on maintaining her computer she could actually spend the time working on her personal coaching business.

The only downside of the entire story is that a Macintosh laptop here would be about € 2000 whereas a similar Windows-based laptop would be about € 1000 – 1500. It is hard to justify such a difference in cost when she never really screws up her computer in the first place anyway. And yes, remarkably Windows is still running without much problems. So at the end of the day people like her will probably never turn to a Macintosh environment for a number of reasons:

  • they have to get adjusted to another operating system,
  • they do not encounter so many problems on Windows that warrants them to consider it a pain in the proverbial butt,
  • they already have established a workflow based on their current software,
  • they will look at their wallet and a € 500 – 1000 price difference is hard to justify (especially for those who are not crazy about computers for more than a tool for doing their work).

So I wonder what Apple will actually do to draw in more of the normal users instead of their largely elite-based userbase still. It’s hard to sell a Macintosh based on price alone and does the price difference account for the productivity gain, however small?

Consolas font and the Windows command prompt

Now that Microsoft allows you to download the Consolas font the question becomes how to add it to the list of choices for the command prompt properties.

In the Microsoft Knowledge Base article 247815 you can find instructions on how to add a font.

Basically on most default Windows XP installations it boils down to adding a String name '00' to the HKLM\Software\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont with a value of 'Consolas' (the corresponding name from HKLM\Software\Microsoft\Windows NT\CurrentVersion\Fonts).

OpenGL fully supported on Vista

In a SIGGraph 2006 presentation by NVIDIA it shows that Microsoft has revisited its stance on how they will support OpenGL within Windows Vista. You may recall when I first wrote about this last year that Microsoft’s initial plan was to layer OpenGL through DirectX.

This time last year…

  • The plan for OpenGL on Windows Vista was to layer OpenGL over Direct3D in order to obtain the Aeroglass experience

The situation today…

  • OpenGL accelerated ICD now fully supported under Windows Vista
  • OpenGL works fully with the Aeroglass compositing desktop
  • Performance and stability will rival Windows XP by driver release

So it seems some complaining still works given sufficient pressure.

Multi-GPU rendering, err, only got one

I recently installed the latest ForceWare drivers from NVIDIA, 91.31. Works great, the new control panel is also quite a nice addition.

However, my machine is a single GPU machine and every time on a fresh boot I am greeted by a popup balloon from the tasktray stating that: “[…] SLI multi-GPU rendering has been disabled.”

Of course having only one GPU that makes, but it is kind of annoying.

I encountered the following article over at NVIDIA’s customer help. The fix, for now, is to incorporate a registry change. In a newer driver this will apparently be fixed (apparently it is in the beta driver). The registry change, however, disables all balloon notifications, which is a bit drastic in my opinion.