As you see I've been a lurker for a while. Good thing since new registrations were closed. I was actually an non-member lurker for a good while before that. Sorry I haven't said anything up til now, not even "Thanks for all your hard work and thanks for keeping this maintained for all our benefit!" Which is way overdue.
I thought your script just used "stock" pieces of the 7-zip package to do the unzipping. If not, I would think it could. The 7-zip Console app pieces 7z.exe and 7z.dll if necessary which are available in both x86 and x64 forms. Your script already does the checks necessary to be able to determine the current architecture, so you can take advantage of it. In the bin folder you could make two sub folders based on the system arch and put the arch dependent versions in the respective folder.
bin
..._86
......dpinst.7z [instead of dpinst32.7z
......the necessary 7-zip x86 files and any other x86 dependent files
..._64
......dpinst.7z [instead of dpinst64.7z
......the necessary 7-zip x64 files and any other x64 dependent files
When you make your architecture checks, set a variable ,%Arch%, to either _86 or _64 as appropriate. Then instead of code like:
IF Exist "%%i:\OEM\bin\un7zip.exe" SET "M=2"
you could use things like:
IF Exist "%%i:\OEM\bin\%Arch%\un7zip.exe" SET "M=2"
This could even end up making the code simpler. Instead of having separate code sections for x86 and x64 use, with the right variables set up you could end up with one code section which might be easier to maintain and troubleshoot, while becoming more flexible at the same time.
This suggestion is from an extremely brief glance through the code, so I might very well have underestimated the impact of trying to make the changes, and if so I appologize. Anyway, it was just a thought.
Cheers and Regards