How to update kernel export driver (TAPE.SYS)?

I’ve made some minor changes for testing purposes to the TAPE.SYS sample in the DDK, and would like to know the “right” way to
install my new driver.

On some systems, I have been successful in replacing my existing copy of TAPE.SYS (I made a backup copy first) by booting up into
another OS on another partition. I can then simply copy my new file over the top of the existing one.

But if that is not possible (let’s say I have only one partition and don’t want to install another OS or copy of the OS, and can’t
boot up into something else), then as you may know, Windows will not allow me to delete TAPE.SYS or copy anything else on top of it.
I guess this is because it is a kernel export driver and it must have a non-zero reference count attached to it in order for it to
be unloaded. This seems to be true even if I don’t have any tape devices attached to the system (i.e.I can’t delete it). But if I
don’t have any tape devices attached, I don’t understand why the system will not let me delete or modify TAPE.SYS.

In summary, is there a “right” way, perhaps using an INF file or a Windows device installer wizard, to update this type of driver
with my own version?

Thanks,
Don

You don’t replace tape.sys you install your replacement (named something
other than tape.sys) for specific tape devices that you support using an
inf file. You need to read up on device installation, pnp device
architecture in windows etc. Start with Walter Oney’s Programming the
Windows Driver Model (Microsoft Press).

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Matthews
Sent: Wednesday, October 26, 2005 10:32 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to update kernel export driver (TAPE.SYS)?

I’ve made some minor changes for testing purposes to the TAPE.SYS sample
in the DDK, and would like to know the “right” way to
install my new driver.

On some systems, I have been successful in replacing my existing copy of
TAPE.SYS (I made a backup copy first) by booting up into
another OS on another partition. I can then simply copy my new file
over the top of the existing one.

But if that is not possible (let’s say I have only one partition and
don’t want to install another OS or copy of the OS, and can’t
boot up into something else), then as you may know, Windows will not
allow me to delete TAPE.SYS or copy anything else on top of it.
I guess this is because it is a kernel export driver and it must have a
non-zero reference count attached to it in order for it to
be unloaded. This seems to be true even if I don’t have any tape
devices attached to the system (i.e.I can’t delete it). But if I
don’t have any tape devices attached, I don’t understand why the system
will not let me delete or modify TAPE.SYS.

In summary, is there a “right” way, perhaps using an INF file or a
Windows device installer wizard, to update this type of driver
with my own version?

Thanks,
Don


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Mark,

Thanks for the reply. I know about that stuff, and I am indeed able to install my device-specific Tape MiniClass driver (named
ACME.SYS) with an INF file (named ACME.INF). But I meant what I said earlier … I really do want to replace TAPE.SYS, and was just
asking how I might go about doing that.

Are you saying that you believe it is impossible to replace TAPE.SYS?

Thanks,
Don

“Roddy, Mark” wrote in message news:xxxxx@ntdev…
You don’t replace tape.sys you install your replacement (named something
other than tape.sys) for specific tape devices that you support using an
inf file. You need to read up on device installation, pnp device
architecture in windows etc. Start with Walter Oney’s Programming the
Windows Driver Model (Microsoft Press).

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Matthews
Sent: Wednesday, October 26, 2005 10:32 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to update kernel export driver (TAPE.SYS)?

I’ve made some minor changes for testing purposes to the TAPE.SYS sample
in the DDK, and would like to know the “right” way to
install my new driver.

On some systems, I have been successful in replacing my existing copy of
TAPE.SYS (I made a backup copy first) by booting up into
another OS on another partition. I can then simply copy my new file
over the top of the existing one.

But if that is not possible (let’s say I have only one partition and
don’t want to install another OS or copy of the OS, and can’t
boot up into something else), then as you may know, Windows will not
allow me to delete TAPE.SYS or copy anything else on top of it.
I guess this is because it is a kernel export driver and it must have a
non-zero reference count attached to it in order for it to
be unloaded. This seems to be true even if I don’t have any tape
devices attached to the system (i.e.I can’t delete it). But if I
don’t have any tape devices attached, I don’t understand why the system
will not let me delete or modify TAPE.SYS.

In summary, is there a “right” way, perhaps using an INF file or a
Windows device installer wizard, to update this type of driver
with my own version?

Thanks,
Don


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

If you want to be able to recover, I would suggest that you install another
OS into another partition on the same machine. You could use FAT32 for the
boot volumes and use a bootable CD with DOS to handle this as well.

Name tape.sys with a new name such as mytape.sys. In the
HKLM\SYSTEM\CurrentControlSet\Services\Tape registry folder, add or change
ImagePath to point to your new file. Make sure ErrorControl is set
correctly so you can boot with a bad driver.

“Don Matthews” wrote in message news:xxxxx@ntdev…
>
> Mark,
>
> Thanks for the reply. I know about that stuff, and I am indeed able to
> install my device-specific Tape MiniClass driver (named ACME.SYS) with an
> INF file (named ACME.INF). But I meant what I said earlier … I really
> do want to replace TAPE.SYS, and was just asking how I might go about
> doing that.
>
> Are you saying that you believe it is impossible to replace TAPE.SYS?
>
> Thanks,
> Don
>
>
>
>
> “Roddy, Mark” wrote in message
> news:xxxxx@ntdev…
> You don’t replace tape.sys you install your replacement (named something
> other than tape.sys) for specific tape devices that you support using an
> inf file. You need to read up on device installation, pnp device
> architecture in windows etc. Start with Walter Oney’s Programming the
> Windows Driver Model (Microsoft Press).
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Don Matthews
> Sent: Wednesday, October 26, 2005 10:32 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to update kernel export driver (TAPE.SYS)?
>
>
> I’ve made some minor changes for testing purposes to the TAPE.SYS sample
> in the DDK, and would like to know the “right” way to
> install my new driver.
>
> On some systems, I have been successful in replacing my existing copy of
> TAPE.SYS (I made a backup copy first) by booting up into
> another OS on another partition. I can then simply copy my new file
> over the top of the existing one.
>
> But if that is not possible (let’s say I have only one partition and
> don’t want to install another OS or copy of the OS, and can’t
> boot up into something else), then as you may know, Windows will not
> allow me to delete TAPE.SYS or copy anything else on top of it.
> I guess this is because it is a kernel export driver and it must have a
> non-zero reference count attached to it in order for it to
> be unloaded. This seems to be true even if I don’t have any tape
> devices attached to the system (i.e.I can’t delete it). But if I
> don’t have any tape devices attached, I don’t understand why the system
> will not let me delete or modify TAPE.SYS.
>
> In summary, is there a “right” way, perhaps using an INF file or a
> Windows device installer wizard, to update this type of driver
> with my own version?
>
> Thanks,
> Don
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@stratus.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>

If this is just for your own testing, you could use Windows PE
(http://www.nu2.nu/pebuilder/). Hope I don’t upset any Microsoft folks with
that URL.

Isn’t the problem actually System File Protection? If so couldn’t you just
use OSR’s SFP Control? http://www.osronline.com/article.cfm?article=152

“David J. Craig” wrote in message
news:xxxxx@ntdev…
> If you want to be able to recover, I would suggest that you install
> another OS into another partition on the same machine. You could use
> FAT32 for the boot volumes and use a bootable CD with DOS to handle this
> as well.
>
> Name tape.sys with a new name such as mytape.sys. In the
> HKLM\SYSTEM\CurrentControlSet\Services\Tape registry folder, add or change
> ImagePath to point to your new file. Make sure ErrorControl is set
> correctly so you can boot with a bad driver.
>
> “Don Matthews” wrote in message
> news:xxxxx@ntdev…
>>
>> Mark,
>>
>> Thanks for the reply. I know about that stuff, and I am indeed able to
>> install my device-specific Tape MiniClass driver (named ACME.SYS) with an
>> INF file (named ACME.INF). But I meant what I said earlier … I really
>> do want to replace TAPE.SYS, and was just asking how I might go about
>> doing that.
>>
>> Are you saying that you believe it is impossible to replace TAPE.SYS?
>>
>> Thanks,
>> Don
>>
>>
>>
>>
>> “Roddy, Mark” wrote in message
>> news:xxxxx@ntdev…
>> You don’t replace tape.sys you install your replacement (named something
>> other than tape.sys) for specific tape devices that you support using an
>> inf file. You need to read up on device installation, pnp device
>> architecture in windows etc. Start with Walter Oney’s Programming the
>> Windows Driver Model (Microsoft Press).
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Don Matthews
>> Sent: Wednesday, October 26, 2005 10:32 AM
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] How to update kernel export driver (TAPE.SYS)?
>>
>>
>> I’ve made some minor changes for testing purposes to the TAPE.SYS sample
>> in the DDK, and would like to know the “right” way to
>> install my new driver.
>>
>> On some systems, I have been successful in replacing my existing copy of
>> TAPE.SYS (I made a backup copy first) by booting up into
>> another OS on another partition. I can then simply copy my new file
>> over the top of the existing one.
>>
>> But if that is not possible (let’s say I have only one partition and
>> don’t want to install another OS or copy of the OS, and can’t
>> boot up into something else), then as you may know, Windows will not
>> allow me to delete TAPE.SYS or copy anything else on top of it.
>> I guess this is because it is a kernel export driver and it must have a
>> non-zero reference count attached to it in order for it to
>> be unloaded. This seems to be true even if I don’t have any tape
>> devices attached to the system (i.e.I can’t delete it). But if I
>> don’t have any tape devices attached, I don’t understand why the system
>> will not let me delete or modify TAPE.SYS.
>>
>> In summary, is there a “right” way, perhaps using an INF file or a
>> Windows device installer wizard, to update this type of driver
>> with my own version?
>>
>> Thanks,
>> Don
>>
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@stratus.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>>
>>
>
>
>

Not impossible, not supported. What happens on a system where there is
more than one tape drive, one that doesn’t work with your modified
tape.sys? If you are in control of both the miniclass driver and your
own private version of tape.sys why not just combine them into a single
load image and not have it link with tape.sys at all? This should be
trivial, just modify the relationship from dll based to static library
based.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Matthews
Sent: Wednesday, October 26, 2005 11:04 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to update kernel export driver (TAPE.SYS)?

Mark,

Thanks for the reply. I know about that stuff, and I am indeed able to
install my device-specific Tape MiniClass driver (named
ACME.SYS) with an INF file (named ACME.INF). But I meant what I said
earlier … I really do want to replace TAPE.SYS, and was just
asking how I might go about doing that.

Are you saying that you believe it is impossible to replace TAPE.SYS?

Thanks,
Don

“Roddy, Mark” wrote in message
news:xxxxx@ntdev…
You don’t replace tape.sys you install your replacement (named something
other than tape.sys) for specific tape devices that you support using an
inf file. You need to read up on device installation, pnp device
architecture in windows etc. Start with Walter Oney’s Programming the
Windows Driver Model (Microsoft Press).

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Matthews
Sent: Wednesday, October 26, 2005 10:32 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to update kernel export driver (TAPE.SYS)?

I’ve made some minor changes for testing purposes to the TAPE.SYS sample
in the DDK, and would like to know the “right” way to
install my new driver.

On some systems, I have been successful in replacing my existing copy of
TAPE.SYS (I made a backup copy first) by booting up into
another OS on another partition. I can then simply copy my new file
over the top of the existing one.

But if that is not possible (let’s say I have only one partition and
don’t want to install another OS or copy of the OS, and can’t
boot up into something else), then as you may know, Windows will not
allow me to delete TAPE.SYS or copy anything else on top of it.
I guess this is because it is a kernel export driver and it must have a
non-zero reference count attached to it in order for it to
be unloaded. This seems to be true even if I don’t have any tape
devices attached to the system (i.e.I can’t delete it). But if I
don’t have any tape devices attached, I don’t understand why the system
will not let me delete or modify TAPE.SYS.

In summary, is there a “right” way, perhaps using an INF file or a
Windows device installer wizard, to update this type of driver
with my own version?

Thanks,
Don


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

I have seen tape.sys replaced. It is a kernel DLL. I know one backup
software producer that made some changes to tape.sys to get more performance
out of it. It still works with all other tape miniport drivers.

It is probably just like installing any other DLL; it will surly require a
reboot.

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Wednesday, October 26, 2005 9:59 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to update kernel export driver (TAPE.SYS)?

Not impossible, not supported. What happens on a system where there is
more than one tape drive, one that doesn’t work with your modified
tape.sys? If you are in control of both the miniclass driver and your
own private version of tape.sys why not just combine them into a single
load image and not have it link with tape.sys at all? This should be
trivial, just modify the relationship from dll based to static library
based.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Matthews
Sent: Wednesday, October 26, 2005 11:04 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to update kernel export driver (TAPE.SYS)?

Mark,

Thanks for the reply. I know about that stuff, and I am indeed able to
install my device-specific Tape MiniClass driver (named
ACME.SYS) with an INF file (named ACME.INF). But I meant what I said
earlier … I really do want to replace TAPE.SYS, and was just
asking how I might go about doing that.

Are you saying that you believe it is impossible to replace TAPE.SYS?

Thanks,
Don

“Roddy, Mark” wrote in message
news:xxxxx@ntdev…
You don’t replace tape.sys you install your replacement (named something
other than tape.sys) for specific tape devices that you support using an
inf file. You need to read up on device installation, pnp device
architecture in windows etc. Start with Walter Oney’s Programming the
Windows Driver Model (Microsoft Press).

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Matthews
Sent: Wednesday, October 26, 2005 10:32 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to update kernel export driver (TAPE.SYS)?

I’ve made some minor changes for testing purposes to the TAPE.SYS sample
in the DDK, and would like to know the “right” way to
install my new driver.

On some systems, I have been successful in replacing my existing copy of
TAPE.SYS (I made a backup copy first) by booting up into
another OS on another partition. I can then simply copy my new file
over the top of the existing one.

But if that is not possible (let’s say I have only one partition and
don’t want to install another OS or copy of the OS, and can’t
boot up into something else), then as you may know, Windows will not
allow me to delete TAPE.SYS or copy anything else on top of it.
I guess this is because it is a kernel export driver and it must have a
non-zero reference count attached to it in order for it to
be unloaded. This seems to be true even if I don’t have any tape
devices attached to the system (i.e.I can’t delete it). But if I
don’t have any tape devices attached, I don’t understand why the system
will not let me delete or modify TAPE.SYS.

In summary, is there a “right” way, perhaps using an INF file or a
Windows device installer wizard, to update this type of driver
with my own version?

Thanks,
Don


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

If it’s JUST for some testing, you might be able to get windbg to replace
tape.sys on the fly. See the windbg .kdfiles command.

  • Jan

I’ve made some minor changes for testing purposes to the TAPE.SYS sample
in the DDK, and would like to know the “right” way to
install my new driver.