Hiding disk PDOs in WinPE using upper port filter driver without reboot

I am trying to hide the disk PDOs exposed by the Storahci driver in WinPE environment. I have written a upper port filter driver which modifies the Hardware ID from “GenDisk” to “xxDisk”. I can verify that the driver is working fine since installing this filter driver on a system which already had Windows OS installed gave the desired results after rebooting the system.

When i install the filter driver in WinPE through command line it prompts for a reboot, and after rebooting i see all the disks exposed by storahci. Can someone please tell me how do i hide the disk PDOs in WinPE environment without rebooting?

The problem is you cannot insert a filter into an existing stack, and the
disk stack is the first thing created. You are going to have to accept the
reboot.

Don Burn
Windows Driver Consulting
Website: http://www.windrvr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Wednesday, July 15, 2015 10:15 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Hiding disk PDOs in WinPE using upper port filter driver
without reboot

I am trying to hide the disk PDOs exposed by the Storahci driver in WinPE
environment. I have written a upper port filter driver which modifies the
Hardware ID from “GenDisk” to “xxDisk”. I can verify that the driver is
working fine since installing this filter driver on a system which already
had Windows OS installed gave the desired results after rebooting the
system.

When i install the filter driver in WinPE through command line it prompts
for a reboot, and after rebooting i see all the disks exposed by storahci.
Can someone please tell me how do i hide the disk PDOs in WinPE environment
without rebooting?


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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

Thanks Don Burn for the reply.

Is there no way that a driver (function, bus or filter) can make the PNP Manager rebuild the device stack once again which includes the (function, bus or filter) driver that hides the disk PDOs?

Also will putting the filter driver in $WinPeDriver$ directory in an USB connected to the system make the Windows Setup load the filter driver when it is trying to build the device stack in WinPE?

No you can’t force the stack to be torn down. Think about the disk stack,
you tear it down on a functioning system and where does the system load its
drivers from?

Don Burn
Windows Driver Consulting
Website: http://www.windrvr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Wednesday, July 15, 2015 10:39 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Hiding disk PDOs in WinPE using upper port filter driver
without reboot

Thanks Don Burn for the reply.

Is there no way that a driver (function, bus or filter) can make the PNP
Manager rebuild the device stack once again which includes the (function,
bus or filter) driver that hides the disk PDOs?

Also will putting the filter driver in $WinPeDriver$ directory in an USB
connected to the system make the Windows Setup load the filter driver when
it is trying to build the device stack in WinPE?


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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

You also can’t change the hwid of a device after pnp has installed drivers on it. You need a bus filter driver to do this, which is a terrible thing to have to write.

Sent from my Windows Phone


From: Don Burnmailto:xxxxx
Sent: ?7/?15/?2015 7:21 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE: [ntdev] Hiding disk PDOs in WinPE using upper port filter driver without reboot

The problem is you cannot insert a filter into an existing stack, and the
disk stack is the first thing created. You are going to have to accept the
reboot.

Don Burn
Windows Driver Consulting
Website: http://www.windrvr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Wednesday, July 15, 2015 10:15 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Hiding disk PDOs in WinPE using upper port filter driver
without reboot

I am trying to hide the disk PDOs exposed by the Storahci driver in WinPE
environment. I have written a upper port filter driver which modifies the
Hardware ID from “GenDisk” to “xxDisk”. I can verify that the driver is
working fine since installing this filter driver on a system which already
had Windows OS installed gave the desired results after rebooting the
system.

When i install the filter driver in WinPE through command line it prompts
for a reboot, and after rebooting i see all the disks exposed by storahci.
Can someone please tell me how do i hide the disk PDOs in WinPE environment
without rebooting?


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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</mailto:xxxxx></mailto:xxxxx>

A question that should be asked: what are you trying to achieve by that?

On Wed, Jul 15, 2015 at 11:27 AM, Peter Wieland
wrote:

> You also can’t change the hwid of a device after pnp has installed
> drivers on it. You need a bus filter driver to do this, which is a
> terrible thing to have to write.
>

Oh I don’t know, I’ve written two or three of those and really they are
sort of fun :slight_smile:

Thanks for the comments. So to summarize it looks like we cannot install a filter driver on top of Storahci in WinPE without a reboot.
However if we could change the device id of the SATA controllers so that the inbox Storahci cannot claim those PDOs and then install the upper Storport filter driver along with another driver which claims the new device id of the SATA controllers and creates disk PDOs, will the device stack contain the upper Storport filter driver FDO above the provided driver FDO without asking for a reboot in WinPE?