All right, I found some more information:
The MSDN states that 'you should install your file system drivers by using an INF file' (by calling SetupCopyOEMInf
etc), but also notes that on Win2k and older systems, 'file system drivers were commonly installed by the Service Control Manager'
And I found another Ext2 driver at sourceforge that comes with an Inno Setup installation script. There they just add a few registry entries under HKLM\SYSTEM\CurrentControlSet\Services\
.
I believe that adding these entries is equal to creating a service with the sc.exe
tool, which internally calls the OpenSCManager
and CreateService
api. I prefer the registry way, because it is easier and I see no advantage in using the api calls, since a reboot is always required.
So I ended up with this solution:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\YourService]
"ErrorControl"=dword:00000001
"Start"=dword:00000003
"Type"=dword:00000001
"DisplayName"="YourServiceDisplayName"
"ImagePath"="System32\Drivers\YourService.sys"
Of course depending on the specifics of the driver in question, some more entries in a Parameters
subkey may be required.
I am still hoping that someone will be able to shed some more light on this question, specifically some details on how to use an inf file for the installation, since this is the way recommended by MS.
Come on, folks! There's a nice bounty to catch here!