Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I wanted to extract the operating system information using offline registry(Software) file.

Am able to read the file,but is there any structure to move to that location where exactly i can get that information.

Can any one help me regarding this way????

Am a forensic investigator where i got a system's hard-disk.
I connected that disk to my system using that disk data i need to get the information of operating system on that connected disk.

"C:\Windows\System32\config\software"
This is the file path..
Posted
Updated 12-Aug-13 0:12am
v4
Comments
H.Brydon 7-Aug-13 10:40am    
Good question. +5 from me...
[no name] 7-Aug-13 11:19am    
This may help http://code.google.com/p/reglookup/
mbue 7-Aug-13 12:56pm    
why dont you examine the os version from system files version?
ps: remember not all registry informations are stored on disk!
Richard MacCutchan 7-Aug-13 13:04pm    
Given the extra information you have added above, it is reasonable to assume that looking for registry hives has nothing to do with your problem. What you need is to mount the disk onto a system that has the ability to recognise different formats. Linux is generally quite good at this but you may still need to get hold of some specialist software to help you. I would suggest spending some time with our good friend Google to see what suggestions you can find.
Richard MacCutchan 12-Aug-13 7:17am    
You have added some information to your question but it really does not mean anything. The issue you face is finding some software that can read the disk even if it is from a foreign source. I suggest you re-read my previous suggestion and get googling.

You'd better use simply the WinApi for this purpose.

Try GetVersionEx. See here

EDIT:
This is how you get the version from the registry:
C++
LPCTSTR version;
HKEY hKey;
if (::RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"), 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS)
{
	TCHAR szData[256];
	DWORD dwKeyDataType;
	DWORD dwDataBufSize = 256;
	if (::RegQueryValueEx(hKey, _T("CurrentVersion"), NULL, &dwKeyDataType, (BYTE*) &szData, &dwDataBufSize) == ERROR_SUCCESS)
	{
		if(dwKeyDataType == REG_SZ)
		{
			version = szData;
		}
	}
}


Here's the mapping for the version numbers
Operating system        Version number
-----------------       --------------
Windows 8                   6.2
Windows Server 2012         6.2
Windows 7                   6.1
Windows Server 2008 R2      6.1
Windows Server 2008         6.0
Windows Vista               6.0
Windows Server 2003 R2      5.2
Windows Server 2003         5.2
Windows XP 64-Bit Edition   5.2
Windows XP                  5.1
Windows 2000                5.0


I hope this was helpful
 
Share this answer
 
v2
Comments
P Uday kishore 7-Aug-13 5:49am    
its not at all a live system.
i need to process a dead system.in that i need to go through the registry files and then extract that information.
[no name] 7-Aug-13 7:23am    
What's dead? You need to explain what you are talking about.
P Uday kishore 7-Aug-13 7:57am    
dead means i have to process a crashed system in that i need to find the operating system installed.so from the registry files i need to read that information(i.e software file).
[no name] 7-Aug-13 8:13am    
If as Richard MacCutchan suggests you wish to examine hives to find out what version of Windows they came from then each hive's format is dependant on OS version. Isn't it easier to put a tag on the machine when the OS is installed? http://www.codeproject.com/Articles/24415/How-to-read-dump-compare-registry-hives
H.Brydon 7-Aug-13 10:37am    
This is a straightforward question. It can mean for example that you have a boot disk from a machine and want to mount the drive (eg. on linux, Mac or even another Windows machine) and look at something on the disk to identify what operating system it is.

... or many variations thereof.
The exact structure of the registry hives is Microsoft private. You should use the Registry functions[^] to get the information you require. You can start with the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion key which contains the information about the Windows version.
 
Share this answer
 
Comments
Hawkfuture 7-Aug-13 6:19am    
That's the point
Richard MacCutchan 7-Aug-13 6:40am    
What?
P Uday kishore 7-Aug-13 8:10am    
ya i know this path.from registry hive i can see it.but i need to read the offline file there i need help to read to move there.
Richard MacCutchan 7-Aug-13 8:37am    
Assuming by "offline file" you mean a stored hive, then I am not sure, although this link has some suggestions.
H.Brydon 7-Aug-13 10:39am    
I think he means that the operating system in question is not booted/running. See my response to pwasser...
I would forget about reading the registry manually. It is probably a very complex file format which is not documented.

If the disk is dead, then why you need to get the OS from it. Backup data files and forget about the OS. Anyway, there might be a sticker on the computer box or you may have restore disks, or a restore partition or someone might remember the OS.

It might be much easier to get information from a well known EXE or DLL file on the system by reading file properties.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900