A simple CL tool that converts .reg to .bat to skip the prompt and implement it better into automations (e.g., into a image as RunOnce file) and overall more flexibility. I used Python for it, as I need a better understanding of it for school reasons.
Example output:
reg2bat converts the whole exported computer registration entry file (280 MB (294,215,422 bytes)) within 3.88 seconds (output removed) - remove the comments from the time module and start/end line to test it yourself. It replaces all root keys with their shorted version:
roots = {
"HKEY_CLASSES_ROOT": "HKCR",
"HKEY_CURRENT_CONFIG": "HKCC",
"HKEY_CURRENT_USER": "HKCU",
"HKEY_DYN_DATA": "HKDD", #used in W95, W98, WME
"HKEY_LOCAL_MACHINE": "HKLM",
"HKEY_USERS": "HKU"
#"HKEY_PERFORMANCE_DATA": "HKPD" #WNT
}wikipedia | Root keys
winreg | nf-winreg-regquerymultiplevaluesa
It supports:
REG_NONE- No defined typeREG_SZ- UTF-16LE stringREG_EXPAND_SZ- Expandable UTF-16LE string with env varsREG_BINARY- Arbitrary binary dataREG_DWORD/REG_DWORD_LITTLE_ENDIAN- 32-bit unsigned integerREG_DWORD_BIG_ENDIAN- 32-bit unsigned integerREG_LINK- Unicode symbolic link to another keyREG_MULTI_SZ- List of UTF-16LE strings (double NUL-terminated)REG_RESOURCE_LIST- Hardware resource listREG_FULL_RESOURCE_DESCRIPTOR- Hardware resource descriptorREG_RESOURCE_REQUIREMENTS_LIST- Hardware resource requirements listREG_QWORD/REG_QWORD_LITTLE_ENDIAN- 64-bit integer
.\reg2bat.py input.reg output.bat