devdevadev Posted February 4 Posted February 4 Hi MSFN Members... I use .cmd which map Partition Image to a Partition entry of USB Drive which uses 'bytepatch.exe'. Bytepatch.exe is a 32-bit program and does not work in 64-bit boot.wim environment. I want to run .cmd in 64-bit boot.wim environment in order to patch bytes of MBR.BIN and PBR.bin of USB Drive. Is there any tool that can patch hex bytes in MBR.bin at a specific Offset location similiar to bytepatch.exe ? I use following bytepatch.exe commands in my Imgptn.cmd - -------------------------------------------------------------------------------------------------------------------------------------- bytepatch.exe my_MBR.mbr -a %MBR_Offset% %Active% %BHd% %BSec% %BCyl% %Parttype% %EHd% %ESec% %ECyl% %StartLBA:~0,2% %StartLBA:~2,2% %StartLBA:~4,2% %StartLBA:~6,2% %SectorsLBA:~0,2% %SectorsLBA:~2,2% %SectorsLBA:~4,2% %SectorsLBA:~6,2% >nul 2>nul bytepatch.exe my_PBR.pbr -a 0x01C %StartLBA:~0,2% %StartLBA:~2,2% %StartLBA:~4,2% %StartLBA:~6,2% >nul 2>nul IF %Partnum%==2 IF %7==65536 bytepatch.exe my_MBR.mbr -a 458 %P1LENMOD:~0,2% %P1LENMOD:~2,2% %P1LENMOD:~4,2% %P1LENMOD:~6,2% >nul 2>nul-------------------------------------------------------------------------------------------------------------------------------------- Please suggest a similiar tool which we can use in our .cmd files to modify MBR.bin and PBR.bin in boot.wim environment to switch various Disk Images into different Partitions of USB Drive..? Thanks & Regards... ------------------------------------------------------------------------------------------------------------------------------------- bytepatch.exe Usage - ============== Byte Patcher (bytepatch) v1.3 build 1809180 - simple binary and PE patch tool copyright (c) bytepointer.com 2016-2018 syntax: bytepatch.exe [options] <input_file> [data_bytes] [data_bytes] patch data may be specified directly as 0-padded hex digits, where two hex digits delineate each byte - spaces optional; e.g.: 33 C0 83 C4 04 [options] -f <file> - load binary data from file instead of command-line -a <uint> - specify patch start address; by default this value designates the base-0 file offset for which to beging patching specified data. -p - this option designates that address argument (-a) is a pointer into specified input file rather than a file offset; the input file must specify a valid Windows PE image (EXE/DLL); when this option is used and no address argument is specified, general PE and section information is displayed for the input file. -b <uint> - in pe pointer mode, overrides preferred load address (base) of image for address calculations. -l <uint> - loglevel number (0=quiet, 1=normal/default, 2=verbose/debug) -t - trial-run; execute normally, but patch is not written to file -? - this help NOTE: numbers given for the options above default to base-10; to specify hex or binary values, please prefix with "0x" or "0b" respectively. IMPORTANT: disasmdump.exe not found in path "E:\_SMART\SMART_SWITCH" disassembler functionality disabled; to enable this functionality (x86 32-bit code only), please download it free from bytepointer.com. --------------------------------------------------------------------------------------------------------------------------------------
Tripredacus Posted February 5 Posted February 5 IDK but this is os, so you could compile it for 64bit https://github.com/nobbele/bytepatcher I'm presuming it is a different project than what you posted about but with the same name.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now