There is (yet another) possibility (though very likely it is is a PITA to modify the program )
Have it behave more or less *like* DISKPART, i.e. spawn a "different" command line if used with no parameters.
This way, each time OfflineReg is launched (without any parameter/command if not the path to the registry file) it enters its own console and does create a backup file, before *any* internal command is executed.
This backup is then renamed to the original file (thus overwriting it) ONLY if the user confirms. i.e. after typing in the internal console quit or exit, a confirmation dialog is shown.
The batcher can use the same tricks currently used for diskpart (besides the possibility of using a script with /s) involving piping to it.
It seems to me way overkill, though.
Maybe (yet another approach) a final command "commit" would be the easiest.
I.e. when you start offlinereg.exe, no matter with which command, you automatically create the (needed) backup file adding to the original filename (and extension) a given "proprietary" extension, as an example ".orf" IF such file does not already exist.
Once (or IF) it already exists, then ALL "read" like request are done to the .orf file, no matter if the request is for the original file or for the .orf, and all "write" like request are as well performed to the .orf file.
At the end of use of the offlinereg, the user can choose to either:
1) do nothing, the original file remains unchanged and the .orf file is the only modified file
2) issue an "offlinereg.exe TARGET commit" command and have the .orf file renamed to the original (thus overwriting it)
Offlinereg.exe could, when started check the date/time stamp of a possibly leftover .orf and - if the file is older than - say - 5 minutes consider it a "previous session leftover" , rename the .orf file to .orfold1 (if orfold1 exists .orfold2, etc.) and proceed to create a new "temporary" .orf file for the "current session".
But maybe this is also too complex.