Could you please post the whole error message (unless "invalid object" is really all that's displayed)? Sounds kinda odd.

But btw. I see you're using XP 64-Bit? Or is that a typo? 64-Bit XP was never a real release and only intended for testing usage, so the problem might come from my function that uses WMI for getting the OS-Name under windows, maybe it's not working with XP 64 bit?