This would be hard to answer for anybody that has not seen your previous question
How do I know the DLL version, in compile time?[
^]
An example using the
sigcheck utility from the SysInternals suite:
@ECHO off
REM Specify source directory of your project here
SET outputdir=c:\projects\myproject\
REM Execute sigcheck to print only file version and redirect to a temp file
path-to-sigcheck\sigcheck -n -q path-to-dll >%outputdir%temp.txt
REM Get file content into a variable
SET /p FILEVER=<%outputdir%temp.txt
REM Create header file
ECHO #pragma once > %outputdir%dll_ver.h
ECHO #define MY_DLL_VERSION _T("%FILEVER%") >> %outputdir%dll_ver.h
REM Uncomment to show the created file
REM type %outputdir%dll_ver.h
[EDIT]
Added the
_T()
macro to the string printed to the header file.
[/EDIT]