You are not exporting a key, you are redirecting the output of REG.EXE to a file, and then you want to edit this output "raw"? Correct, answer follow.. Why not export using a .reg file and the re-import/merge the .reg file? Because of the format of data, the .reg data format is as follows:Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE]key=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00\Now consider you have 80K bytes and line split happens at \, what you would have to process is a for loop join all 80K bytes to singular line to be sure replacement entry is not at the split then resplit the data and reconstruct the entire 25xbyte format to import it back to registry. So, you now probably understand that I did consider this method, but it will fail at regular cmd for loop because of size of data being expanded even further by ',' separator and it's even harder to re-split the data. It would even be easier to replace at raw data then reconstruct the line with ',' separator. Kinda need a xmas miracle powershell script here, heh. BTW, Merry Christmas to everyone, if convenient.