Best way to add version info to my sys kernel file

Thanks to all the help from here I now have a working kernel driver, signed and operating under Win 64 and 32. It’s a simple setup with a single *.sys file that I load using the service control manager. I now want to give this file version information so that my installer (Innosetup) can know whether to update it (rather than using the file date-time). I’m relatively new to C and I’ve developed the driver just using examples and text file editing of my *.c and *.h file. Is there a special command I can put in the source or a tool to run after which will poke version info into my file? I only really need the basic version numbering…
Thanks
Brian.

I’m not clear on whether you’re (a) looking to patch your existing version
information in your binary; or (b) just asking how to get version
information into your binary.

If the former, you might want to take a look at Pavel’s excellent
http://www.codeproject.com/KB/install/VerPatch.aspx.

If the later, then probably the easiest way is to blatantly copy the
paradigm (and files) used by the many of the wdk samples.

Like that of ‘ioctl,’ for example:

#include <windows.h>

#include <ntverp.h>

#define VER_FILETYPE VFT_DRV
#define VER_FILESUBTYPE VFT2_DRV_SYSTEM
#define VER_FILEDESCRIPTION_STR “”
#define VER_INTERNALNAME_STR “”

#define VER_FILEVERSION
#define VER_PRODUCTVERSION

#include “common.ver”

Take a look in ‘common.ver’ (/inc/api/common.ver) for more
possibilities.

Good luck,

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@appliedrelaytesting.co.uk
Sent: Tuesday, March 08, 2011 3:37 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Best way to add version info to my sys kernel file

Thanks to all the help from here I now have a working kernel driver, signed
and operating under Win 64 and 32. It’s a simple setup with a single *.sys
file that I load using the service control manager. I now want to give this
file version information so that my installer (Innosetup) can know whether
to update it (rather than using the file date-time). I’m relatively new to C
and I’ve developed the driver just using examples and text file editing of
my *.c and *.h file. Is there a special command I can put in the source or a
tool to run after which will poke version info into my file? I only really
need the basic version numbering…
Thanks
Brian.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</ntverp.h></windows.h>

Excellent, thanks - it was the latter. I’ll go look at your example.