|
:=================================================================================
: This is verpatch demo for a SAMPLE PROJECT
: Set version info on all exe, dll, sys files.
: Assume the files are in one flat directory, otherwise consider using FOR /R
:
: See readme.txt for list of the version info properties you may want to use.
:=================================================================================
@echo verpatch demo
@echo off
setlocal enabledelayedexpansion
if ERRORLEVEL 1 exit
: 1. Define the version to set on all files, and (optional) custom build comments
set VERSION="1.2.3.4 (%date%)"
set BUILDINFO=/s pb "Built by %USERNAME%"
: 2. Put here custom descriptions for each file. Unlisted files get default description.
set foo.exe.desc="foo exe application"
set moo.dll.desc="moo dll description"
set shmoo.sys.desc="shmoo sys driver"
: 3. The company and product info
set COMPINFO=/s company "sample company" /s (c) "(c) Sample copyleft 2009"
set PRODINFO=/s product "sample product" /pv "1.0.22.33"
: 4. Ready to go...
for %%f in (*.exe *.dll *.sys) do call :putver "%%f"
echo *** All done***
exit /b 0
: ============ subroutine: run verpatch on one file =================
:putver
set _file=%~nx1
echo processing file [%_file%]
if defined %_file%.desc (set FILEDESCR=/s desc !%_file%.desc%!) else (set FILEDESCR=)
verpatch.exe /va "%_file%" %FILEDESCR% %VERSION% %COMPINFO% %PRODINFO% %BUILDINFO%
if ERRORLEVEL 1 pause
goto :EOF
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.