• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How do you determine the OS installed on a drive?

engineereeyore

Platinum Member
Aside from the obvious "turn on the drive", does anyone know how you can determine the installed OS on a non-active drive. What I mean by that is, say I have a hard drive in an enclosure connected to my computer. I want to know what OS is installed on that drive. Any ideas?

I know .NET has the OperatingSystem class that provides such information, but I believe it only works on active drives. If I'm wrong about that, please let me know. Other than that, I have no idea how to find this information, other than looking for a specific group of Folders that are native to different installations, but those can be changed.

Suggestions if you have them.
 
Originally posted by: sigs3gv
Uhh, see what file system is on there using cfdisk, or PartitionMagic?

Well, that still doesn't narrow it down completely. Even XP or 2000 could be installed on a FAT32 partition. Don't know why you'd do it, but it's still possible.
 
I take it you want to know how to determine the OS on a drive that is powered up but not active from a program you are writing?

I dont know any specific functions to do that, but you could read files on the drive like setuplog.txt and parse them for the OS. On XP, the line
07/15/2004 18:07:26,d:\xpsp1\base\...
appears which you can see denotes XP service pack 1.
 
I am unaware of any functions that can be used to determine the OS of a drive that was not loaded (i.e. system was not booted from that disk). Your only option may be to examine some facet of the file structure and hope that it was a default install (or perhaps look at versions of specific files).
 
Your going to have to check for certain files and then read the version info record off them to determine versions (e.g. service packs, etc). No OS functionality to do what your asking.
 
Just take the version off of ntoskrnl.exe. That will give you the OS version as well as SP version, if any (as long as you have records of what major/minor versions are out there).
 
Sweet. Well thanks for the help. I'll use a couple of those files and assume the user is not an idiot and screwed them up. I would imagine any super-genious that would purposely alter such files wouldn't be using the program anyway.
 
Back
Top