ServiceBinary restriction?

I have a simple INF file used for installation a FS filter driver. It works with no problem if driver is installed to system32\drivers directory. However, I’d like to install it to the directory where application resides. It doesn’t work:

#-035 Processing service Add/Delete section [DefaultInstall.Services].
#E032 Error 0xe0000217: A service installation section in this INF is invalid.
#E275 Error while installing services. Error 0xe0000217: A service installation section in this INF is invalid.

It seems driver has to be installed under %systemroot% this way; ServiceBinary can be %10%, %11% or %12%\driver.sys but everything else fails. Binary path could be later changed using SCM API or sc.exe utility but it is inelegant. Does anybody know how to install driver via INF to custom directory, ideally specified using environment variable (it has to be installed via Wise or something like this).

BTW, I know it is possible to use SCM API directly for this purpose but I’d prefer INF because of easier maintenance. It is better if setup people don’t have anything to break :wink:

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

>I have a simple INF file used for installation a FS filter driver. It works
with no problem if

driver is installed to system32\drivers directory. However, I’d like to
install it to the directory
where application resides. It doesn’t work:

Correct. After all, your app can be installed on non-SystemRoot volume, which
will make it too complex to load the FS filter from there.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

> ----------

From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Maxim S. Shatskih[SMTP:xxxxx@storagecraft.com]
Reply To: Windows System Software Devs Interest List
Sent: Tuesday, April 05, 2005 10:48 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] ServiceBinary restriction?

>I have a simple INF file used for installation a FS filter driver. It works
with no problem if
>driver is installed to system32\drivers directory. However, I’d like to
install it to the directory
>where application resides. It doesn’t work:

Correct. After all, your app can be installed on non-SystemRoot volume, which
will make it too complex to load the FS filter from there.

In this case the limitation could be for %24% directory ID which is the root of SystemRoot volume.

Well, I can understand the limitation has some reasoning behind it but why it isn’t documented?

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]