Identifying Windows Version, Outside of Windows
I'm trying to programmatically find the version of Windows operating system that has it's primary partition mounted within my Linux box. Does anyone know how this can be reliably done?
I was considering reading one of the registry hives, but I don't know how reliable that would be across versions, and I don't know if that would be easy to find out without actually having each version with me. Not to mention, I don't know where I would find it, and hives can get corrupted.
Right now, I'm liking the idea of reading the boot.ini file. The W2K box I'm on now has
Code:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Professional" /fastdetect
and the XP box I used to have looked identical, except for the OS name string. If you're running Vista or 7, it would be great if you could post your boot.ini file for me. I know the string could be changed (I've done it before) without messing anything up, so this could not work, but I'm guessing that 99.99% of people don't. :)
Thanks