Pass the HEX string as argument to hextostr.exe. The converted text is written to the standard output stream.
The lightweight 32 bit executable is highly liberal in what it accepts. Every found pair of contiguous HEX digits is converted into a character. Lone-standig HEX digits, spaces, etc. are just ignored. Additionally, anything passed to the tool is treated as a single argument, regardless of whether it was enclosed in quotes.
Some examples, all converted to "AZ"
Code: Select all
hextostr 415A
hextostr " 41 5A "
hextostr 41 5a
hextostr 0x41 0x5a
hextostr "&H41 &H5a"
hextostr \x41\x5A
hextostr %%41%%5A
for /f "delims=" %%s in ('hextostr "415a"') do echo captured: %%s
Code: Select all
hextostr foobar
Note: The amount of data which can be converted is limited by the maximum length of a command line because the HEX string is to be passed as argument. Consider to use CERTUTIL -DECODEHEX for the conversion of a HEX-encoded file.
Steffen