inf2cat 22.9.10: the tool does not expand a variable
This is part of the reason ChkInf was deprecated a few years ago 😝 It is
probably the least reliable source of INF truth that MS released.
However, InfVerif can be used as the de facto source of INF truth. It
internally uses the OS INF parser, so it has no divergence at all. InfVerif
will point out if there are any %string% tokens in the file that do not get
replaced (and FYI, they will be replaced anywhere in the file as long as there
is a match in [strings]).
Also interesting, we re-wrote the INF parser in Win8, and it is *way* more
consistent and coherent than it was before that point. You won't find the same
sort of differences between how various things get handled any more.
Unfortunately, inf2cat was implemented before the new parser, and works much
more closely to how ChkInf works. We're working on switching inf2cat over.
From: firstname.lastname@example.org [mailto:email@example.com] On Behalf Of
Sent: Wednesday, December 6, 2017 10:00 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] inf2cat 22.9.10: the tool does not expand a variable
>> you might double-check that all your line endings are consistently CRLF.
> Thank you for the suggestion but all line endings in the file are really CR/LF
(just checked to be sure). Moreover, there are empty lines before and after each
of lines in my example. Even more, I had cross-tested it, replacing %DriverFile%
with actual file name, running inf2cat, replacing file name with %DriverFile%
back, and running inf2cat again.
No, there's no need to check anything else. Remember, the complete source code
for ChkInf is included in the WDK. I just checked, and indeed it does not
expand strings within a CopyFiles section.
From the beginning of time ;), perhaps the biggest flaw in the INF world is that
there has never been a definitive syntax description. It's all just crap that
has accreted over the decades without any consistency or centralized control.
The sections do not all follow the same rules, and there is no place that
definitively states where %strings% are allowed and where they are not. It's
clearly not a general purpose macro language, so without rules, we just have to
Thus, the authors of ChkInf could argue that they are following the
documentation, because the documentation does not state whether this is supposed
to work or not. The fact that the operating system DOES seem to expand strings
suggests that ChkInf ought to do so as well.
Tim Roberts, firstname.lastname@example.org
Providenza & Boekelheide, Inc.
NTDEV is sponsored by OSR
Visit the list online at:
MONTHLY seminars on crash dump analysis, WDF, Windows internals and software
To unsubscribe, visit the List Server section of OSR Online at