标题: [注册表类] [源码]Reg2Inf v0.46 注册表转换inf [打印本页]
作者: aries215 时间: 2019-1-31 02:16 标题: [源码]Reg2Inf v0.46 注册表转换inf
作者:n7Epsilon
出处:https://ryanvm.net/forum/viewtopic.php?t=2169
下载:http://cid-704054d7328ec826.skyd ... Reg2Inf%5E_0.46.zip
md5: 303E74C60C5D138FE0AB6611C1F6ABB4(未解压)
http://bcn.bathome.net/s/tool/index.html?key=Reg2Inf
C#,基于.NET2.0,完全用正则式转换。
支持:
- 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 和 DelReg
手册:- A program to convert registry information from Windows Registry
- format (.REG) to standard Windows INF format (.INF).
- ** Usage:
- * Reg2Inf "Tweaks.REG"|@"List.txt" (["Tweaks.INF"]|[/linesonly]) [/RepVars]
- [/UseStrings] [/forceascii] [/longflags]
- - List file should contain paths to REG files to merge and convert.
- - /RepVars: Look for some values (eg: "C:\Program Files") and replace with
- equivalent INF-specific variables (eg: %16422%). <EXPERIMENTAL>
- - /linesonly: Output INF format registry lines without writing a generic INF.
- - /UseStrings: Generate [Strings] section and use INF variables in subkeys.
- - /forceascii: Saves the output INF in ANSI system codepage instead of Unicode
- - /longflags: Makes the output INF use fully qualified hexadecimal flags,
- to be compatible with Windows setup textmode parser.
复制代码
范例:- @echo off
- pushd "%~dp0"
- for %%a in (*.reg) do (
- if "%%~na" neq "" Reg2Inf.exe "%%~na.reg" "%%~na.inf"
- )
- pause
复制代码
缺点:
2006年开发的工具,还没普及64bit系统,或者Dirids还不健全,所以使用“/RepVars”参数时,会把“C:\Program Files (x86)\Common Files”这种目录,会转成“%16422% (x86)\Common Files”。
希望帮忙改进,注册表的数值路径不该转换。优先处理最长的目录,补全dirids。如果也能支持转为cmd就更好了。- [DestinationDirs]
- -1 Absolute path
- 1 %~dp0%
- 00 Null LDID [this LDID can be used to create a new LDID]
- 01 Source Drive_Letter:\Path_Name (the directory from which the INF file was installed)
- 02 Temp Setup
- 03 Uninstall
- 04 Backup
- 10 Windows directory. %SystemRoot%.
- 11 System directory. %SystemRoot%\system32.
- 12 Drivers directory. %SystemRoot%\system32\drivers.
- 13 Driver package's Driver Store directory. For Windows 8.1 and later, specifies the path to the Driver Store directory where the driver package was imported.
- The optional subdirectory in the SourceDiskFiles section for a file must match the subdirectory in the DestinationDirs section for the entry that applies to this file.
- Don't use DelFiles on a file for which DestinationDirs includes dirid 13.
- Don't use CopyFiles to rename a file for which DestinationDirs includes dirid 13.
- 14 Control Panel
- 15 Printers
- 16 Workgroup
- 17 INF Directory [%windir%\INF]
- 18 Help directory [%windir%\HELP]
- 19 Administration
- 20 Fonts [%windir%\FONTS]
- 21 Viewers [%windir%\SYSTEM\VIEWERS]
- 22 VMM32 [%windir%\SYSTEM\VMM32]
- 23 Color directory [%windir%\SYSTEM\COLOR]
- 24 Root of drive containing the Windows files are installed directory. e.g., if dirid 10 is "C:\winnt", then dirid 24 is "C:\".
- 25 Shared directory
- 26 Guaranteed boot device for Windows (Winboot) [C:\ root]
- 27 Machine [%windir%]
- 28 Host Winboot [usually C:\ root]
- 30 Root directory of the boot disk, also known as "ARC system partition". (This might or might not be the same directory as the one represented by dirid 24.)
- 31 Root directory of the Host drive of a virtual boot drive [usually C:\ root]
- 50 System directory. This is equivalent to %SystemRoot%\system.
- 51 Spool directory. (not used for installing printer drivers - see Printer Dirids)
- 53 User profile directory.
- 54 Directory where Ntldr.exe and Osloader.exe are located.
- 55 Print processors directory. (not used for installing printer drivers)
-
- 16384 %USERPROFILE%\Desktop
- 16386 %USERPROFILE%\Start Menu\Programs
- 16389 %USERPROFILE%\Documents
- 16390 %USERPROFILE%\Favorites
- 16391 %USERPROFILE%\Start Menu\Programs\Startup
- 16392 %USERPROFILE%\Recent
- 16393 %USERPROFILE%\SendTo
- 16395 %USERPROFILE%\Start Menu
- 16397 %USERPROFILE%\Music
- 16398 %USERPROFILE%\Videos
- 16400 %USERPROFILE%\Desktop
- 16403 %USERPROFILE%\NetHood
- 16405 %USERPROFILE%\Templates
- 16406 %ALLUSERSPROFILE%\Start Menu
- 16407 %ALLUSERSPROFILE%\Start Menu\Programs
- 16408 %ALLUSERSPROFILE%\Start Menu\Programs\Startup
- 16409 %ALLUSERSPROFILE%\Desktop
- 16410 %USERPROFILE%\Application Data
- 16411 %USERPROFILE%\PrintHood
- 16412 %USERPROFILE%\Local Settings\Application Data
- 16415 %ALLUSERSPROFILE%\Favorites
- 16416 %USERPROFILE%\Local Settings\Temporary Internet Files
- 16417 %USERPROFILE%\Cookies
- 16418 %USERPROFILE%\Local Settings\History
- 16419 %ALLUSERSPROFILE%\Application Data
- 16422 %ProgramFiles%
- 16423 %USERPROFILE%\Pictures
- 16425 %SystemRoot%\system32 (valid for Microsoft Win32 user-mode applications that are running under Windows on Windows (WOW64))
- 16426 Program Files (valid for Win32 user-mode applications that are running under WOW64)
- 16427 %ProgramFiles%\Common Files
- 16428 Program Files\Common (valid for Win32 user-mode applications that are running under WOW64)
- 16429 %ALLUSERSPROFILE%\Templates
- 16430 %ALLUSERSPROFILE%\Documents
- 16431 %ALLUSERSPROFILE%\Start Menu\Programs\Administrative Tools
- 16432 %USERPROFILE%\Start Menu\Programs\Administrative Tools
- 16437 %ALLUSERSPROFILE%\Documents\My Music
- 16438 %ALLUSERSPROFILE%\Documents\My Pictures
- 16439 %ALLUSERSPROFILE%\Documents\My Videos
- 16440 %SystemRoot%\Resources
- 16441 %SystemRoot%\Resources\0409
- 16443 %USERPROFILE%\Local Settings\Application Data\Microsoft\CD Burning
复制代码
作者: 老刘1号 时间: 2019-1-31 11:22
一直用的这个:http://bcn.bathome.net/tool/reg2inf.exe
同时感谢lz分享
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |