BinMod Tool (Compact 2013)
The BinMod Tool (binmod.exe) extracts files from a run-time image, and replaces files in a run-time image.
binmod [-i imagename] [-r replacement_filename.ext | -e extraction_filename.ext]
File name of the .bin file to stamp with a license key. The default is nk.bin.
File name of the file for replacement.
File name of the file for extraction.
The following command-line syntax extracts a sample file called filename.exe from the run-time image. The file can be any file within the tools limitations, such as a text file, a dynamically-linked library (DLL), and so on:
binmod -i nk.bin -e filename.exe
You can use BinMod to insert a placeholder file of the correct stamp size into the run-time image, and then run the -r command in a loop in a batch file to find the placeholder file in the image, and then replace it with a file that contains the license key for the run-time image.
To stamp multiple run-time images with a license key, use the BinMod tool with a batch file. Otherwise, you must use the Platform Builder user interface to stamp each run-time image individually with a license key.
The BinMod tool can be used only with run-time images with a .bin file type, and it can be used only on files in the FILES section of the .bib file for the run-time image. The tool will always succeed at replacing a file if the new file the same size or smaller than the original module, taking compression into account. If the new file is larger, the BinMod tool tries to find free space in the run-time image. If there is no free space available, the file will not be replaced. Because the tool is usually replacing uncompressed text files that are adjusted to the final expected size, keeping the file and run-time image the same size, this is usually not a problem..