As I have seen the lack of decent Reg2Inf converters on the Internet (except for WillyPad which needs to support more than just strings and dwords), I have decided to write one of my own.
This Reg2Inf converter is also written in C# and runs completely on Regular Expressions.

I must thank vier and Aserone for all of their help on this, Aserone provided a reference INF (which was extremely helpful) and vier helped me find out about the comments bug.
Also a thank you goes to Siginet for providing an official forum for this tool (and giving me super mod powers

http://www.siginetsoftware.com/forum/fo ... y.php?f=12
Currently Supports:
- REG_SZ, REG_DWORD, REG_DWORD_BIG_ENDIAN, REG_LINK, REG_EXPAND_SZ, REG_MULTI_SZ, REG_BINARY, REG_QWORD, REG_FULL_RESOURCE_DESCRIPTOR, REG_RESOURCE_REQUIREMENTS_LIST and REG_NONE.
- AddReg and DelReg functionality.
Current Version is: 0.46
Download:
Main Link:
Download from SkyDrive
md5: 303E74C60C5D138FE0AB6611C1F6ABB4
- I apologize for not releasing the GUI frontend yet, but I am working on it. This is the most recent version of the Reg2Inf engine until I do release it.
Download includes C# source code, compiled executable is in \bin\Release inside the ZIP file. It also includes the Reg2InfHandler.cmd file to be copied to the SendTo folder.
Requires: .NET Framework 2.0 Final or higher
* Changelog:
0.46
- Fixed a regular expression bug that lead to dropping empty subkey declarations.
0.45
- Fixed a tiny bug that caused fixes to not be applied on the subkeyname causing corruption of the output Inf (only affects subkey names that have % or ")
0.44
- Fixed bug causing parser to fail if the regblock began with whitespace.
- Fixed internal regression causes internal check to trigger on empty regblocks (fixes OZ's issue)
0.42
- Minor performance changes (switch to generic dictionaries)
- INF file is now saved as Unicode (UTF16-LE) by default because saving as UTF8 caused Windows to mess up data in other language when re-importing the INF file.
- Fixes were not applied to ValueNameData unless it had a string value.
0.40
- Support for inline comments by the REG parser
- Fixed a rare issue with some combinations of slashes and quotes in REG_EXPAND_SZ and REG_MULTI_SZ.
- An internal check is now made to check for splitting problems (which lead to missing tweaks in output) and an error will be displayed if the check fails.
- Reg2Inf will now display the number of errors produced during conversion in the console output (to help with diagnosing non-working or non-converting tweaks due to syntax errors and to help with bug hunting)
- Code cleanup and some expression optimization
- Updated SimpleIniEditor (/forceascii will now save the REG file using ASCII and using the Current system codepage instead of defaulting to US English for all locales).
0.37
- Support for more formats (REG_DWORD_BIG_ENDIAN, REG_LINK, REG_RESOURCE_LIST, REG_FULL_RESOURCE_DESCRIPTOR, REG_RESOURCE_REQUIRMENTS_LIST) (hex(5-6-8-9-A)).
- Fixed a minor parsing oversight where it wouldn't match the hex type if the number was preceded by zeroes (eg: hex(03))
- Reg2Inf will now write a comment showing any lines that failed to convert in the output for easier testing in larger REG file conversions.
- Thanks for the research done by Mr.Woo for uncovering the more obscure REG types.
0.36
- Port of FGCBA's SimpleINIEditorV3 to Reg2Inf
- Switch to .NET 2.0 generics
- INF output is now written in Unicode BOM (which is the same encoding Windows Regedit uses to output v5 REG files) unless /forceascii is specified.
- Complete re-write of hex(2) and hex(7) engines to properly honor and support v4 and v5 REG files
- Full support for international and Unicode characters (in v5 REG files).
- Added support for Qword (hex(b)) (I have to thank to Mr.Woo for bringing it to attention that this type exists).
0.31
- Allowed Reg2Inf to process a list file containing paths to REG files to merge into one final INF file. (reg2inf @"ListFile.txt" ....)
- Process all subkeys and locate common roots and substitute with variables. (in /UseStrings instead of old behaviour)
- %16427% was removed because it wasn't being correctly substituted.
- Various performance optimizations.
- Fixed a bug where trailing commas in hex(2) and hex(7) would cause Reg2Inf to fail when it attempted to convert a blank string to a char, now also removes any trailing comma from hex (binary).
0.28
- Complete rewrite of Argument Parser (now at v2) - Removed silly workarounds.
- New switch /UseStrings to assign variables to subkeys and generate a [Strings] section in the output INF.
0.26
- Worked around Argument Parser limitation
0.25
- Fixed bug with fixes not being applied on REG_MULTI_SZ or REG_EXPAND_SZ.
- Added new fix for converting % to %%.
- Included Reg2InfHandler.cmd inside ZIP file with the source.
0.23
- Added proper errorlevel returning:
0 = No errors
5 = Argument Error (too many parameters / too few parameters / invalid parameter / REG file does not exist)
1 = Invalid REG file (conversion failed)
6 = Unsupported path format
10 = Something really unexpected (equivalent to a crash)
- Output INF file now contains [Optional Components] section so it can be correctly packaged into a separate addon without any modifications...
0.22
- Fixed all kinds of stupid regex confusion by removing all comments from the file in memory before processing.
- Fixed last RegLine in RegBlock being chopped off if there was a comment after it.
- All dword(s) are now padded to 8 characters by zeroes instead of now being dropped.
- HKCR / HKLM / HKCU and HKU are now recognized as valid root keys (although Windows Registry Editor does not support them), this is a kind of auto-repair functionality.
0.20
- Fixed many bugs when parsing empty subkeys (resulting INF was creating subkeys with @ set to "" which is inaccurate).
- Fixed bugs in parsing values with pathnames ending with a \, was confusing RegEx and adding an extra unnecessary quote.
- Fixed bug with not deleting temp files in some cases.
- Implemented DelReg functionality, output will be in DelReg section