Best .reg to .inf tool?

Forum for anything else which doesn't fit in the above forums. Site feedback, random talk, whatever, are welcome.
Post Reply
RicaNeaga
Posts: 221
Joined: Fri Apr 16, 2010 11:59 am

Best .reg to .inf tool?

Post by RicaNeaga » Mon Feb 04, 2013 7:47 am

I was trying to make some silent installers some time ago and I was stuck when I saw how hard was to run and add some .reg entries to a x64 system. So hopefully adding them directly from an .inf would make that custom installer multi-os and multi-architecture compatible.

Because I'm only a semi-advanced user when it comes to addon / silent installer making, can you recommend me a tool that (quickly and without errors) transform a .reg file into an .inf file, and so properly transforming also the .reg entries?

Thanks. :)

User avatar
shiner
Posts: 655
Joined: Sun Nov 08, 2009 4:18 am
Location: SE Asia

Post by shiner » Mon Feb 04, 2013 8:55 am

RN,

n7Epsilon's reg2inf.exe version 0.46 .
The thread is here.

If the dl link is no longer active in n7Epsilon's thread, let me know and I will up my addon for shell tools that include reg2inf. My addon is a modified version of one of gora's releases.
"You can lead a horse to water, but you can't make it drink."

User avatar
5eraph
Site Admin
Posts: 4619
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Mon Feb 04, 2013 2:20 pm

I also use n7Epsilon's tool. It requires .NET 2.0. Bear in mind that the experimental /RepVars switch does not handle the following DirIDs:
  • %16425% - C:\WINDOWS\SysWOW64
    %16426% - C:\Program Files (x86)
    %16427% - C:\Program Files\Common Files
    %16428% - C:\Program Files (x86)\Common Files
What you'll see is:
  • %10%\SysWOW64
    %16422% (x86)
    %16422%\Common Files
    %16422% (x86)\Common Files
Last edited by 5eraph on Mon Feb 04, 2013 3:45 pm, edited 1 time in total.

User avatar
ricktendo64
Posts: 3213
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Mon Feb 04, 2013 2:55 pm

OnePiece also has a reg2inf tool (currently don't have a link you will need to search for it)

User avatar
5eraph
Site Admin
Posts: 4619
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Mon Feb 04, 2013 3:45 pm

OnePiece calls it DX's Tool (DXTool.exe). It appears to be a compiled AutoIt script that does not require .NET.

User avatar
OnePiece Alb
Posts: 525
Joined: Sat Sep 01, 2007 7:01 pm
Location: Albania
Contact:

Post by OnePiece Alb » Sun Jun 16, 2013 11:42 am

only now I see this post, I never found the time to give them all the info, but reg2inf tool supports a lot more, Example reg2inf knows all the directories in all languages :wink: and converts them into DirID
; $sFilter - Optional the filter to use, default is "(?i)\.reg$" $sFilter is REGEXP Mod, See Pattern Parameters in StringRegExp
; $iFlags - Optional, Default is $iFlags = 0 (add the flags together for multiple operations):
; $iFlags = 1 - Delete file after
; $iFlags = 2 - Replace, if destination file exists
; $iFlags = 4 - Rename, if destination file exists
; Defaut if destination file exists, rename output Path file, example C:\file.inf in C:\file (n).inf
;
; $iFlags = 8192 - Set\Use Normal Hex String, 0x00000000 (REG_SZ) & 0x00020000 (REG_EXPAND_SZ) & 0x00000001 (REG_BINARY) ect ect ect
; Default is Short Hex String, 0x0 (REG_SZ) or 0x20000 (REG_EXPAND_SZ) or 0x1 (REG_BINARY) ect ect ect
; $iFlags = 16384 - Set\Use Variable Mod, %REG_SZ% (REG_SZ=0x00000000) or %REG_DWORD% (REG_DWORD=0x00010001) ect ect
; $iFlags = 8 - Add REG_NOCLOBBER Flags (0x00000002), Prevent a given value from replacing the value of an existing value entry.
; If Set\Used REG_DELVAL Flags, REG_NOCLOBBER Flags will be ignored
; $iFlags = 16 - Add REG_OVERWRITEONLY Flags (0x00000020), Reset to the supplied value only if the specified value-entry-name already
; exists in the given subkey. If Set\Used REG_DELVAL or REG_NOCLOBBER Flags, REG_OVERWRITEONLY Flags will be ignored
; $iFlags = 32 - Add REG_32BITKEY Flags (0x00004000), (Windows XP and later versions of Windows.) Make the specified change
; in the 32-bit registry. If not specified, the change is made to the native registry.
; $iFlags = 64 - Add REG_64BITKEY Flags (0x00001000), (Windows XP and later versions of Windows.) Make the specified change
; in the 64-bit registry. If not specified, the change is made to the native registry.
; $iFlags = 128 - Add REG_DELVAL Flags (0x00000004), Delete the given subkey from the registry, or delete the specified value-entry-name
; from the specified registry subkey.
; $iFlags = 256 - Add REG_APPEND Flags (0x00000008), If Set\Used REG_DELVAL Flags, REG_APPEND Flags will be ignored
; Append a given value to that of an existing named value entry. This flag is valid only if FLG_ADDREG_TYPE_MULTI_SZ is also set.
; The specified string value is not appended if it already exists.
; $iFlags = 512 - Convert DirID Folder Path in DirID Variable, example "C:\Program Files" in %16422%
; If is not set $iFlags = 1024 and $idLang = "" Defaut Lang used is @MUILang
; $iFlags = 1024 - Convert DirID Folder Path in DirID Variable, example "C:\Program Files" in %16422%, Cheeck All Language
; $iFlags = 2048 - Convert\Write in Inf file REG_DWORD in binary mod (example Hex Mod = 0x410 Binary Mod = 10,04,00,00)
; $iFlags = 4096 - Add BackUp Reg Section in Inf File
; $ohKey - HKEY Name
; $oSubKey - SubKey Name
; $idLang - Set LangID, If is Set\Used $iFlags = 1024 $idLang will be ignored
; $sUserName - Optional, UserName, default is @UserName, $sUserName will be ignored if the $idLang or $iFlags = 512 or $iFlags = 1024 is not used\set
Image

/F=$sFilter
/L=$idLang
/A=$iFlags
/UserName=$sUserName
/hKey=$ohKey
/SubKey=$oSubKey
/O=output

Example /A = Delete file after + Replace, if destination file exists

Code: Select all

DXTool.exe /RTI /A=3 C:\file.reg

Ciao a tutti.
Last edited by OnePiece Alb on Mon Jun 17, 2013 5:44 pm, edited 4 times in total.

SHO_GuN
Posts: 144
Joined: Fri Jun 30, 2006 11:26 pm

Post by SHO_GuN » Sun Jun 16, 2013 1:05 pm

Though I use it for other things, I had problems with OnePiece's DX Tool for converting reg files. The version I have is many years old so the later versions probably work fine.

However, I don't have nor do I want any .NET installed. I now use the following method to convert reg files to inf files.

I use an sfx to create a folder on my desktop with a batch file and Reg2Inf.exe inside of it. I then place the reg file inside of it that I want to convert with the name "reg.reg". I then run the batch file and creates the output "inf.inf".

Contents of batch file:

Code: Select all

"D:\Slipstream\nLruntimeR3.exe" /VERYSILENT /DIR="%userprofile%\Desktop\Reg2Inf"

reg2inf reg.reg inf.inf

"%userprofile%\Desktop\Reg2Inf\unins000.exe" /VERYSILENT
As you can see in the batch file, the trick is installing Nuhi's nLruntimeR3.exe for the duration of the operation.

User avatar
OnePiece Alb
Posts: 525
Joined: Sat Sep 01, 2007 7:01 pm
Location: Albania
Contact:

Post by OnePiece Alb » Sun Jun 16, 2013 3:15 pm

always make sure to use latest version

Code: Select all

"D:\Slipstream\nLruntimeR3.exe" /VERYSILENT /DIR="%userprofile%\Desktop\Reg2Inf"

::this does not work ?
DXTool.exe /RTI /reg.reg
:: or
:: "%userprofile%\Desktop\Reg2Inf\DXTool.exe" /RTI reg.reg
:: or set Output Dir
:: "%userprofile%\Desktop\Reg2Inf\DXTool.exe" /RTI reg.reg /O="%SystemDrive%\"
:: or
:: DXTool.exe /RTI /A=2 reg.reg

"%userprofile%\Desktop\Reg2Inf\unins000.exe" /VERYSILENT
Ciao.

Post Reply