How to open SYSTEM and SAM reg files for reading if they were copied from another PC using C #?
How to read information from them, for example, to get to (file) SOFWARE \ Microsoft \ Windows NT \ CurrentVersion \ NetworkCards?
How to open SYSTEM and SAM reg files for reading if they were copied from another PC using C #?
How to read information from them, for example, to get to (file) SOFWARE \ Microsoft \ Windows NT \ CurrentVersion \ NetworkCards?
The offline registry file is a text file with the extension * .reg => you can read it as text and parse. There is another HIVE format, which is not a textual representation and is read differently, but is not familiar with it at all.
A regular registry file (not HIVE) has a fairly simple structure, where [] is written the registry branch, and below it is a key-value dictionary. If you believe Google, then it is compatible in * .ini format.
For example, my registry looks like this:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE] @="" [HKEY_LOCAL_MACHINE\SOFTWARE\7-Zip] "Path"="C:\\Program Files (x86)\\7-Zip\\" "Path64"="C:\\Program Files (x86)\\7-Zip\\" [HKEY_LOCAL_MACHINE\SOFTWARE\ABBYY] [HKEY_LOCAL_MACHINE\SOFTWARE\ABBYY\FineReader] [HKEY_LOCAL_MACHINE\SOFTWARE\ABBYY\FineReader\11.00] [HKEY_LOCAL_MACHINE\SOFTWARE\ABBYY\FineReader\12.00] [HKEY_LOCAL_MACHINE\SOFTWARE\ABBYY\FineReader\12.00\Integration] "SupportedOpenImageFormat"="bmp,dib,rle,dcx,djvu,djv,gif,jb2,jbig2,jp2,j2k,jpf,jpx,jpc,jpg,jpeg,pcx,pdf,png,tif,tiff,xps,wdp,wmp" [HKEY_LOCAL_MACHINE\SOFTWARE\Adobe] [HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Distiller] @="" [HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Distiller\DC] @="" "InstallPath"="C:\\Program Files (x86)\\Adobe\\Acrobat DC\\Acrobat" "RunFromLocalDisk"=dword:00000001 "JobOptions"="Standard" "JobOptionsFolder"="C:\\ProgramData\\Adobe\\Adobe PDF\\Settings\\" "DefaultPDFOutput"="Documents\\*.pdf" Here it is actually said that there is nothing ready in .NET and you can try using the INI format parser.
using (RegistryKey registry = Registry.LocalMachine.OpenSubKey(keyPath)) { //читаешь keyPath } which disk is the registry itself is not important.
Source: https://ru.stackoverflow.com/questions/891327/
All Articles