I need to convert a DLL file to HEX representation to use it as a part of string to create a sql server assembly like this
CREATE ASSEMBLY [AssemblyNameHere]
FROM 0x4D5A90000300000004000000FFFF000......continue binary data
WITH PERMISSION_SET = EXTERNAL_ACCESS
I need this to be in a batch file for many reasons, but it seems that FOR statement only suitable for text files.
It is not a very good idea to create a hex output with pure batch.
But you could use vbscript or for simple tasks FC.exe could work.
First I create a file with (nearly) the same length, and then I compare them with FC in binary mode (/B), the output is scanned and if a line missings are detected, they are filled with the hexVal of the x10 string (in this case 0x41=’A’).