1

I have this in my .inf:

[Strings]
Driver_Name = "Our driver, build version 1112"

For some reason (better SVN hook compatibility - want to assing build number at each time I commit .sys), want this to be:

[Strings]
DrvVer = "1111";
Driver_Name = "Our driver, build version %DrvVer"

Unfortunately, this doesn't get processed, so %DrvVer% remains in place; the other idea is to use "%Driver_Name% %DrvVer%" construct outside of [Strings], but don't sure how to join this parts, too.

Peter O.
  • 32,158
  • 14
  • 82
  • 96
kagali-san
  • 2,964
  • 7
  • 48
  • 87
  • why don't you merge text and versionnumber in your programmsource? – endo.anaconda Nov 16 '11 at 10:59
  • @endo.anaconda because its not the correct way to see version info for a constantly changing driver - for example, in driver install dialog, few older versions may be floating around - and I don't want to go to %windir%\inf and delete old files manually. Some other day, I would move the version information to some GUI statusbar and forget about it, but currently, want to have that info displayed at anywhere possible. – kagali-san Nov 16 '11 at 11:20

1 Answers1

2

im not familiar with SVN hooks but maybe some info about INF files will help you.

as far as i know %strings% are not interpreted within the String section.

If you want to concat them "%Driver_Name% %DrvVer%" is already the correct syntax, but it doesnt work within the strings section

i wonder why you are putting the version in the strings section. microsoft already implemented a special Version section for INF files. please take a look at this links:

INF Version Section

INF DriverVer

you could lay out your INF like this:

[Strings]
DrvVer = 1111
BuildDate = 01/11/2011

[Version]
DriverVer=%BuildDate%,%DrvVer%
DriverPackageDisplayName="our driver, build version %DrvVer%"

it should work and looks more standard

weberik
  • 2,636
  • 1
  • 18
  • 11
  • thanks, here's some points :) and it seems that Microsoft doesn't care about this section in it's own DDK .inf examples. – kagali-san Nov 25 '11 at 07:50