How to perform registry cleanup on driver update?

We have two drivers for the same devices/HW IDs, legacy and w7 driver.
w7 driver creates some registry values for device node using AddReg
directive. For example:

[w7_Device_AddReg]
HKR,“Exclusive”,0x10001,1

w7 driver automatically is installed from WU but some users prefer
legacy driver. They update driver using legacy INF and everything is OK
except there are remaining registry values from previous w7 driver
installation. They influence legacy driver behaviour and break legacy
app. For example, legacy app doesn’t expect legacy driver devices
exclusive. In turn, everything works if only legacy driver was installed
and stops working when w7 driver was installed at first and updated to
legacy driver.

My question is how to delete w7 values from the registry. There is
DelReg INF section but it seems it should be included in legacy INF to
delete w7 values. I can hardly believe it but can’t find a way how to
make cleanup from w7 INF. Something which’d be called when w7 driver is
updated to something else which could delete all installed registry
entries. Uninstalling and deleting driver using DM works but it isn’t a
solution as users just update driver which is natural.

Is there some way how to solve it purely by w7 INF change?

Best regards,

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

Nobody knows? OK, I can make registry cleanup in the legacy driver INF.
But it seems I have to clean up also WDF registry values which were
created by WDF installation as w7 driver is WDF one. That’s weird.

I mean following hardware key subkeys:

  • Device Parameters\WDF
  • Device Parameters\WUDF
  • Device Parameters\WUDFDiagnosticInfo

I can’t believe cleanup should be done from other INF than created
values and subkeys. But apparently WDF INFs don’t make any cleanup and I
don’t see any way how to do cleanup from INF during driver update. Is it
really so or am I missing something?

Best regards,

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Saturday, May 23, 2009 5:07 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to perform registry cleanup on driver update?

We have two drivers for the same devices/HW IDs, legacy and w7 driver.
w7 driver creates some registry values for device node using AddReg
directive. For example:

[w7_Device_AddReg]
HKR,“Exclusive”,0x10001,1

w7 driver automatically is installed from WU but some users prefer
legacy driver. They update driver using legacy INF and
everything is OK
except there are remaining registry values from previous w7 driver
installation. They influence legacy driver behaviour and break legacy
app. For example, legacy app doesn’t expect legacy driver devices
exclusive. In turn, everything works if only legacy driver
was installed
and stops working when w7 driver was installed at first and updated to
legacy driver.

My question is how to delete w7 values from the registry. There is
DelReg INF section but it seems it should be included in legacy INF to
delete w7 values. I can hardly believe it but can’t find a way how to
make cleanup from w7 INF. Something which’d be called when w7
driver is
updated to something else which could delete all installed registry
entries. Uninstalling and deleting driver using DM works but
it isn’t a
solution as users just update driver which is natural.

Is there some way how to solve it purely by w7 INF change?

Best regards,

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


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

A coinstaller? It can see the uninstall and ‘clean-up’.

DelReg sections along with the AddReg sections to ‘clear’ whatever might
have been in place prior? This will probably not work as it would have to
be implemented in the ‘downlevel’ version which is out the door, right?

-dave

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Monday, May 25, 2009 7:42 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to perform registry cleanup on driver update?

Nobody knows? OK, I can make registry cleanup in the legacy driver INF.
But it seems I have to clean up also WDF registry values which were
created by WDF installation as w7 driver is WDF one. That’s weird.

I mean following hardware key subkeys:

  • Device Parameters\WDF
  • Device Parameters\WUDF
  • Device Parameters\WUDFDiagnosticInfo

I can’t believe cleanup should be done from other INF than created
values and subkeys. But apparently WDF INFs don’t make any cleanup and I
don’t see any way how to do cleanup from INF during driver update. Is it
really so or am I missing something?

Best regards,

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Saturday, May 23, 2009 5:07 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to perform registry cleanup on driver update?

We have two drivers for the same devices/HW IDs, legacy and w7 driver.
w7 driver creates some registry values for device node using AddReg
directive. For example:

[w7_Device_AddReg]
HKR,“Exclusive”,0x10001,1

w7 driver automatically is installed from WU but some users prefer
legacy driver. They update driver using legacy INF and
everything is OK
except there are remaining registry values from previous w7 driver
installation. They influence legacy driver behaviour and break legacy
app. For example, legacy app doesn’t expect legacy driver devices
exclusive. In turn, everything works if only legacy driver
was installed
and stops working when w7 driver was installed at first and updated to
legacy driver.

My question is how to delete w7 values from the registry. There is
DelReg INF section but it seems it should be included in legacy INF to
delete w7 values. I can hardly believe it but can’t find a way how to
make cleanup from w7 INF. Something which’d be called when w7
driver is
updated to something else which could delete all installed registry
entries. Uninstalling and deleting driver using DM works but
it isn’t a
solution as users just update driver which is natural.

Is there some way how to solve it purely by w7 INF change?

Best regards,

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


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


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

Coinstaller doesn’t seem to be invoked on driver update. Uninstall is
different and there is no problem because devnode in the registry is
deleted. But users prefer update.

DelReg in downlevel version is what I’m just doing and still see ugly
surprises… It is for Win7 and above so it is possible to give update
to legacy driver and say old version don’t support Win7. Anyway, driver
has to be signed for Win7 so not a big deal if we don’t already have it
signed :-/

Best regards,

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David
R. Cattley
Sent: Tuesday, May 26, 2009 2:12 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to perform registry cleanup on driver update?

A coinstaller? It can see the uninstall and ‘clean-up’.

DelReg sections along with the AddReg sections to ‘clear’
whatever might
have been in place prior? This will probably not work as it
would have to
be implemented in the ‘downlevel’ version which is out the
door, right?

-dave

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Monday, May 25, 2009 7:42 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to perform registry cleanup on driver update?

Nobody knows? OK, I can make registry cleanup in the legacy
driver INF.
But it seems I have to clean up also WDF registry values which were
created by WDF installation as w7 driver is WDF one. That’s weird.

I mean following hardware key subkeys:

  • Device Parameters\WDF
  • Device Parameters\WUDF
  • Device Parameters\WUDFDiagnosticInfo

I can’t believe cleanup should be done from other INF than created
values and subkeys. But apparently WDF INFs don’t make any
cleanup and I
don’t see any way how to do cleanup from INF during driver
update. Is it
really so or am I missing something?

Best regards,

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

> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of
Michal Vodicka
> Sent: Saturday, May 23, 2009 5:07 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to perform registry cleanup on driver update?
>
> We have two drivers for the same devices/HW IDs, legacy and
w7 driver.
> w7 driver creates some registry values for device node using AddReg
> directive. For example:
>
> [w7_Device_AddReg]
> HKR,“Exclusive”,0x10001,1
>
> w7 driver automatically is installed from WU but some users prefer
> legacy driver. They update driver using legacy INF and
> everything is OK
> except there are remaining registry values from previous w7 driver
> installation. They influence legacy driver behaviour and
break legacy
> app. For example, legacy app doesn’t expect legacy driver devices
> exclusive. In turn, everything works if only legacy driver
> was installed
> and stops working when w7 driver was installed at first and
updated to
> legacy driver.
>
> My question is how to delete w7 values from the registry. There is
> DelReg INF section but it seems it should be included in
legacy INF to
> delete w7 values. I can hardly believe it but can’t find a
way how to
> make cleanup from w7 INF. Something which’d be called when w7
> driver is
> updated to something else which could delete all installed registry
> entries. Uninstalling and deleting driver using DM works but
> it isn’t a
> solution as users just update driver which is natural.
>
> Is there some way how to solve it purely by w7 INF change?
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
> —
> 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
>


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


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

What about having the ‘new’ drivers store those properties in a different
subkey. The new driver can ‘migrate’ he old settings or use the old
settings as ‘defaults’ unless overridden in the new driver params subkey.
That way the ‘new’ driver settings do not overwrite any existing old driver
settings so that a force downrev install is unaffected.

Good Luck,
-dave

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Monday, May 25, 2009 8:19 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to perform registry cleanup on driver update?

Coinstaller doesn’t seem to be invoked on driver update. Uninstall is
different and there is no problem because devnode in the registry is
deleted. But users prefer update.

DelReg in downlevel version is what I’m just doing and still see ugly
surprises… It is for Win7 and above so it is possible to give update
to legacy driver and say old version don’t support Win7. Anyway, driver
has to be signed for Win7 so not a big deal if we don’t already have it
signed :-/

Best regards,

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David
R. Cattley
Sent: Tuesday, May 26, 2009 2:12 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to perform registry cleanup on driver update?

A coinstaller? It can see the uninstall and ‘clean-up’.

DelReg sections along with the AddReg sections to ‘clear’
whatever might
have been in place prior? This will probably not work as it
would have to
be implemented in the ‘downlevel’ version which is out the
door, right?

-dave

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Monday, May 25, 2009 7:42 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to perform registry cleanup on driver update?

Nobody knows? OK, I can make registry cleanup in the legacy
driver INF.
But it seems I have to clean up also WDF registry values which were
created by WDF installation as w7 driver is WDF one. That’s weird.

I mean following hardware key subkeys:

  • Device Parameters\WDF
  • Device Parameters\WUDF
  • Device Parameters\WUDFDiagnosticInfo

I can’t believe cleanup should be done from other INF than created
values and subkeys. But apparently WDF INFs don’t make any
cleanup and I
don’t see any way how to do cleanup from INF during driver
update. Is it
really so or am I missing something?

Best regards,

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

> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of
Michal Vodicka
> Sent: Saturday, May 23, 2009 5:07 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to perform registry cleanup on driver update?
>
> We have two drivers for the same devices/HW IDs, legacy and
w7 driver.
> w7 driver creates some registry values for device node using AddReg
> directive. For example:
>
> [w7_Device_AddReg]
> HKR,“Exclusive”,0x10001,1
>
> w7 driver automatically is installed from WU but some users prefer
> legacy driver. They update driver using legacy INF and
> everything is OK
> except there are remaining registry values from previous w7 driver
> installation. They influence legacy driver behaviour and
break legacy
> app. For example, legacy app doesn’t expect legacy driver devices
> exclusive. In turn, everything works if only legacy driver
> was installed
> and stops working when w7 driver was installed at first and
updated to
> legacy driver.
>
> My question is how to delete w7 values from the registry. There is
> DelReg INF section but it seems it should be included in
legacy INF to
> delete w7 values. I can hardly believe it but can’t find a
way how to
> make cleanup from w7 INF. Something which’d be called when w7
> driver is
> updated to something else which could delete all installed registry
> entries. Uninstalling and deleting driver using DM works but
> it isn’t a
> solution as users just update driver which is natural.
>
> Is there some way how to solve it purely by w7 INF change?
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
> —
> 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
>


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


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


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

There is no problem between values drivers used. I’m sane enough to not
use the same names for both drivers. There is the problem with values
for system use. Exclusive, Security (descriptor) etc. They’re dictated
for new driver by a (MS) specification we have to conform to.
Unfortunately, they influence old driver, too. Security descriptor is
too restrictive so an unprivileged app can’t open the device, old
devices aren’t exclusive etc. In turn, update to old driver causes
DOS…

BTW, one of weird things is that HKR,“Exclusive”,… creates the value
under hw key whereas HKR,“SomethingElse” creates the value under hw key
Device Parameters subkey.

Best regards,

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David
R. Cattley
Sent: Tuesday, May 26, 2009 2:44 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to perform registry cleanup on driver update?

What about having the ‘new’ drivers store those properties in
a different
subkey. The new driver can ‘migrate’ he old settings or use the old
settings as ‘defaults’ unless overridden in the new driver
params subkey.
That way the ‘new’ driver settings do not overwrite any
existing old driver
settings so that a force downrev install is unaffected.

Good Luck,
-dave

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Monday, May 25, 2009 8:19 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to perform registry cleanup on driver update?

Coinstaller doesn’t seem to be invoked on driver update. Uninstall is
different and there is no problem because devnode in the registry is
deleted. But users prefer update.

DelReg in downlevel version is what I’m just doing and still see ugly
surprises… It is for Win7 and above so it is possible to give update
to legacy driver and say old version don’t support Win7.
Anyway, driver
has to be signed for Win7 so not a big deal if we don’t
already have it
signed :-/

Best regards,

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

> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of David
> R. Cattley
> Sent: Tuesday, May 26, 2009 2:12 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] How to perform registry cleanup on
driver update?
>
> A coinstaller? It can see the uninstall and ‘clean-up’.
>
> DelReg sections along with the AddReg sections to ‘clear’
> whatever might
> have been in place prior? This will probably not work as it
> would have to
> be implemented in the ‘downlevel’ version which is out the
> door, right?
>
> -dave
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of
Michal Vodicka
> Sent: Monday, May 25, 2009 7:42 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] How to perform registry cleanup on
driver update?
>
> Nobody knows? OK, I can make registry cleanup in the legacy
> driver INF.
> But it seems I have to clean up also WDF registry values which were
> created by WDF installation as w7 driver is WDF one. That’s weird.
>
> I mean following hardware key subkeys:
>
> - Device Parameters\WDF
> - Device Parameters\WUDF
> - Device Parameters\WUDFDiagnosticInfo
>
> I can’t believe cleanup should be done from other INF than created
> values and subkeys. But apparently WDF INFs don’t make any
> cleanup and I
> don’t see any way how to do cleanup from INF during driver
> update. Is it
> really so or am I missing something?
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
>
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of
> Michal Vodicka
> > Sent: Saturday, May 23, 2009 5:07 AM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] How to perform registry cleanup on driver update?
> >
> > We have two drivers for the same devices/HW IDs, legacy and
> w7 driver.
> > w7 driver creates some registry values for device node
using AddReg
> > directive. For example:
> >
> > [w7_Device_AddReg]
> > HKR,“Exclusive”,0x10001,1
> >
> > w7 driver automatically is installed from WU but some users prefer
> > legacy driver. They update driver using legacy INF and
> > everything is OK
> > except there are remaining registry values from previous w7 driver
> > installation. They influence legacy driver behaviour and
> break legacy
> > app. For example, legacy app doesn’t expect legacy driver devices
> > exclusive. In turn, everything works if only legacy driver
> > was installed
> > and stops working when w7 driver was installed at first and
> updated to
> > legacy driver.
> >
> > My question is how to delete w7 values from the registry. There is
> > DelReg INF section but it seems it should be included in
> legacy INF to
> > delete w7 values. I can hardly believe it but can’t find a
> way how to
> > make cleanup from w7 INF. Something which’d be called when w7
> > driver is
> > updated to something else which could delete all
installed registry
> > entries. Uninstalling and deleting driver using DM works but
> > it isn’t a
> > solution as users just update driver which is natural.
> >
> > Is there some way how to solve it purely by w7 INF change?
> >
> > Best regards,
> >
> > Michal Vodicka
> > UPEK, Inc.
> > [xxxxx@upek.com, http://www.upek.com]
> >
> > —
> > 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
> >
>
> —
> 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
>
>
> —
> 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
>


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


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

>BTW, one of weird things is that HKR,“Exclusive”,… creates the value
under hw key whereas HKR,“SomethingElse” creates the value under hw key
Device Parameters subkey.

By design. There are special values that get promoted into the parent key. Exclusive is one of them. Upper/LowerFilters are 2 more. These are all doc’ed in the AddReg section in the docs.

d

Sent from my phone with no t9, all spilling mistakes are not intentional.

-----Original Message-----
From: Michal Vodicka
Sent: Monday, May 25, 2009 6:04 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to perform registry cleanup on driver update?

There is no problem between values drivers used. I’m sane enough to not
use the same names for both drivers. There is the problem with values
for system use. Exclusive, Security (descriptor) etc. They’re dictated
for new driver by a (MS) specification we have to conform to.
Unfortunately, they influence old driver, too. Security descriptor is
too restrictive so an unprivileged app can’t open the device, old
devices aren’t exclusive etc. In turn, update to old driver causes
DOS…

BTW, one of weird things is that HKR,“Exclusive”,… creates the value
under hw key whereas HKR,“SomethingElse” creates the value under hw key
Device Parameters subkey.

Best regards,

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

> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of David
> R. Cattley
> Sent: Tuesday, May 26, 2009 2:44 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] How to perform registry cleanup on driver update?
>
> What about having the ‘new’ drivers store those properties in
> a different
> subkey. The new driver can ‘migrate’ he old settings or use the old
> settings as ‘defaults’ unless overridden in the new driver
> params subkey.
> That way the ‘new’ driver settings do not overwrite any
> existing old driver
> settings so that a force downrev install is unaffected.
>
> Good Luck,
> -dave
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> Sent: Monday, May 25, 2009 8:19 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] How to perform registry cleanup on driver update?
>
> Coinstaller doesn’t seem to be invoked on driver update. Uninstall is
> different and there is no problem because devnode in the registry is
> deleted. But users prefer update.
>
> DelReg in downlevel version is what I’m just doing and still see ugly
> surprises… It is for Win7 and above so it is possible to give update
> to legacy driver and say old version don’t support Win7.
> Anyway, driver
> has to be signed for Win7 so not a big deal if we don’t
> already have it
> signed :-/
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
>
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of David
> > R. Cattley
> > Sent: Tuesday, May 26, 2009 2:12 AM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] How to perform registry cleanup on
> driver update?
> >
> > A coinstaller? It can see the uninstall and ‘clean-up’.
> >
> > DelReg sections along with the AddReg sections to ‘clear’
> > whatever might
> > have been in place prior? This will probably not work as it
> > would have to
> > be implemented in the ‘downlevel’ version which is out the
> > door, right?
> >
> > -dave
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of
> Michal Vodicka
> > Sent: Monday, May 25, 2009 7:42 PM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] How to perform registry cleanup on
> driver update?
> >
> > Nobody knows? OK, I can make registry cleanup in the legacy
> > driver INF.
> > But it seems I have to clean up also WDF registry values which were
> > created by WDF installation as w7 driver is WDF one. That’s weird.
> >
> > I mean following hardware key subkeys:
> >
> > - Device Parameters\WDF
> > - Device Parameters\WUDF
> > - Device Parameters\WUDFDiagnosticInfo
> >
> > I can’t believe cleanup should be done from other INF than created
> > values and subkeys. But apparently WDF INFs don’t make any
> > cleanup and I
> > don’t see any way how to do cleanup from INF during driver
> > update. Is it
> > really so or am I missing something?
> >
> > Best regards,
> >
> > Michal Vodicka
> > UPEK, Inc.
> > [xxxxx@upek.com, http://www.upek.com]
> >
> >
> >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of
> > Michal Vodicka
> > > Sent: Saturday, May 23, 2009 5:07 AM
> > > To: Windows System Software Devs Interest List
> > > Subject: [ntdev] How to perform registry cleanup on driver update?
> > >
> > > We have two drivers for the same devices/HW IDs, legacy and
> > w7 driver.
> > > w7 driver creates some registry values for device node
> using AddReg
> > > directive. For example:
> > >
> > > [w7_Device_AddReg]
> > > HKR,“Exclusive”,0x10001,1
> > >
> > > w7 driver automatically is installed from WU but some users prefer
> > > legacy driver. They update driver using legacy INF and
> > > everything is OK
> > > except there are remaining registry values from previous w7 driver
> > > installation. They influence legacy driver behaviour and
> > break legacy
> > > app. For example, legacy app doesn’t expect legacy driver devices
> > > exclusive. In turn, everything works if only legacy driver
> > > was installed
> > > and stops working when w7 driver was installed at first and
> > updated to
> > > legacy driver.
> > >
> > > My question is how to delete w7 values from the registry. There is
> > > DelReg INF section but it seems it should be included in
> > legacy INF to
> > > delete w7 values. I can hardly believe it but can’t find a
> > way how to
> > > make cleanup from w7 INF. Something which’d be called when w7
> > > driver is
> > > updated to something else which could delete all
> installed registry
> > > entries. Uninstalling and deleting driver using DM works but
> > > it isn’t a
> > > solution as users just update driver which is natural.
> > >
> > > Is there some way how to solve it purely by w7 INF change?
> > >
> > > Best regards,
> > >
> > > Michal Vodicka
> > > UPEK, Inc.
> > > [xxxxx@upek.com, http://www.upek.com]
> > >
> > > —
> > > 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
> > >
> >
> > —
> > 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
> >
> >
> > —
> > 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
> >
>
> —
> 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
>
>
> —
> 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
>


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

Then maybe you should go for a complete reinstall.
Wrap the driver into some exe that will do whatever is needed.
And, since users prefer update, call this “easy updater” :slight_smile:

Regards,
– pa

Michal Vodicka wrote:

There is no problem between values drivers used. I’m sane enough to not
use the same names for both drivers. There is the problem with values
for system use. Exclusive, Security (descriptor) etc. They’re dictated
for new driver by a (MS) specification we have to conform to.
Unfortunately, they influence old driver, too. Security descriptor is
too restrictive so an unprivileged app can’t open the device, old
devices aren’t exclusive etc. In turn, update to old driver causes
DOS…

BTW, one of weird things is that HKR,“Exclusive”,… creates the value
under hw key whereas HKR,“SomethingElse” creates the value under hw key
Device Parameters subkey.

Best regards,

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

> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of David
> R. Cattley
> Sent: Tuesday, May 26, 2009 2:44 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] How to perform registry cleanup on driver update?
>
> What about having the ‘new’ drivers store those properties in
> a different
> subkey. The new driver can ‘migrate’ he old settings or use the old
> settings as ‘defaults’ unless overridden in the new driver
> params subkey.
> That way the ‘new’ driver settings do not overwrite any
> existing old driver
> settings so that a force downrev install is unaffected.
>
> Good Luck,
> -dave
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> Sent: Monday, May 25, 2009 8:19 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] How to perform registry cleanup on driver update?
>
> Coinstaller doesn’t seem to be invoked on driver update. Uninstall is
> different and there is no problem because devnode in the registry is
> deleted. But users prefer update.
>
> DelReg in downlevel version is what I’m just doing and still see ugly
> surprises… It is for Win7 and above so it is possible to give update
> to legacy driver and say old version don’t support Win7.
> Anyway, driver
> has to be signed for Win7 so not a big deal if we don’t
> already have it
> signed :-/
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of David
>> R. Cattley
>> Sent: Tuesday, May 26, 2009 2:12 AM
>> To: Windows System Software Devs Interest List
>> Subject: RE: [ntdev] How to perform registry cleanup on
> driver update?
>> A coinstaller? It can see the uninstall and ‘clean-up’.
>>
>> DelReg sections along with the AddReg sections to ‘clear’
>> whatever might
>> have been in place prior? This will probably not work as it
>> would have to
>> be implemented in the ‘downlevel’ version which is out the
>> door, right?
>>
>> -dave
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of
> Michal Vodicka
>> Sent: Monday, May 25, 2009 7:42 PM
>> To: Windows System Software Devs Interest List
>> Subject: RE: [ntdev] How to perform registry cleanup on
> driver update?
>> Nobody knows? OK, I can make registry cleanup in the legacy
>> driver INF.
>> But it seems I have to clean up also WDF registry values which were
>> created by WDF installation as w7 driver is WDF one. That’s weird.
>>
>> I mean following hardware key subkeys:
>>
>> - Device Parameters\WDF
>> - Device Parameters\WUDF
>> - Device Parameters\WUDFDiagnosticInfo
>>
>> I can’t believe cleanup should be done from other INF than created
>> values and subkeys. But apparently WDF INFs don’t make any
>> cleanup and I
>> don’t see any way how to do cleanup from INF during driver
>> update. Is it
>> really so or am I missing something?
>>
>> Best regards,
>>
>> Michal Vodicka
>> UPEK, Inc.
>> [xxxxx@upek.com, http://www.upek.com]
>>
>>
>>
>>> -----Original Message-----
>>> From: xxxxx@lists.osr.com
>>> [mailto:xxxxx@lists.osr.com] On Behalf Of
>> Michal Vodicka
>>> Sent: Saturday, May 23, 2009 5:07 AM
>>> To: Windows System Software Devs Interest List
>>> Subject: [ntdev] How to perform registry cleanup on driver update?
>>>
>>> We have two drivers for the same devices/HW IDs, legacy and
>> w7 driver.
>>> w7 driver creates some registry values for device node
> using AddReg
>>> directive. For example:
>>>
>>> [w7_Device_AddReg]
>>> HKR,“Exclusive”,0x10001,1
>>>
>>> w7 driver automatically is installed from WU but some users prefer
>>> legacy driver. They update driver using legacy INF and
>>> everything is OK
>>> except there are remaining registry values from previous w7 driver
>>> installation. They influence legacy driver behaviour and
>> break legacy
>>> app. For example, legacy app doesn’t expect legacy driver devices
>>> exclusive. In turn, everything works if only legacy driver
>>> was installed
>>> and stops working when w7 driver was installed at first and
>> updated to
>>> legacy driver.
>>>
>>> My question is how to delete w7 values from the registry. There is
>>> DelReg INF section but it seems it should be included in
>> legacy INF to
>>> delete w7 values. I can hardly believe it but can’t find a
>> way how to
>>> make cleanup from w7 INF. Something which’d be called when w7
>>> driver is
>>> updated to something else which could delete all
> installed registry
>>> entries. Uninstalling and deleting driver using DM works but
>>> it isn’t a
>>> solution as users just update driver which is natural.
>>>
>>> Is there some way how to solve it purely by w7 INF change?
>>>
>>> Best regards,
>>>
>>> Michal Vodicka
>>> UPEK, Inc.
>>> [xxxxx@upek.com, http://www.upek.com]
>>>
>>> —

> -----Original Message-----

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Tuesday, May 26, 2009 4:05 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to perform registry cleanup on driver update?

By design. There are special values that get promoted into
the parent key. Exclusive is one of them. Upper/LowerFilters
are 2 more. These are all doc’ed in the AddReg section in the docs.

They are but I don’t see promotion to parent key documented. In
addition, some of them are automatically deleted on update
(Lower/UpperFilters) and the remaining (which cause our problems)
aren’t. It is pretty inconsistent. Why aren’t all special values
deleted?

Best regards,

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

We do complete reinstall when possible. However, there are users who
simply update driver from DM. Some of them reported this problem, we
weren’t aware about it. Also, there are customers who use our driver
with their apps and want just driver, not an exe. Next thing is Windows
Update when AFAIK has to be driver only. Etc.

Best regards,

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Pavel A.
Sent: Tuesday, May 26, 2009 9:44 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to perform registry cleanup on driver update?

Then maybe you should go for a complete reinstall.
Wrap the driver into some exe that will do whatever is needed.
And, since users prefer update, call this “easy updater” :slight_smile:

Regards,
– pa

Michal Vodicka wrote:
> There is no problem between values drivers used. I’m sane
enough to not
> use the same names for both drivers. There is the problem
with values
> for system use. Exclusive, Security (descriptor) etc.
They’re dictated
> for new driver by a (MS) specification we have to conform to.
> Unfortunately, they influence old driver, too. Security
descriptor is
> too restrictive so an unprivileged app can’t open the device, old
> devices aren’t exclusive etc. In turn, update to old driver causes
> DOS…
>
> BTW, one of weird things is that HKR,“Exclusive”,…
creates the value
> under hw key whereas HKR,“SomethingElse” creates the value
under hw key
> Device Parameters subkey.
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of David
>> R. Cattley
>> Sent: Tuesday, May 26, 2009 2:44 AM
>> To: Windows System Software Devs Interest List
>> Subject: RE: [ntdev] How to perform registry cleanup on
driver update?
>>
>> What about having the ‘new’ drivers store those properties in
>> a different
>> subkey. The new driver can ‘migrate’ he old settings or
use the old
>> settings as ‘defaults’ unless overridden in the new driver
>> params subkey.
>> That way the ‘new’ driver settings do not overwrite any
>> existing old driver
>> settings so that a force downrev install is unaffected.
>>
>> Good Luck,
>> -dave
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of
Michal Vodicka
>> Sent: Monday, May 25, 2009 8:19 PM
>> To: Windows System Software Devs Interest List
>> Subject: RE: [ntdev] How to perform registry cleanup on
driver update?
>>
>> Coinstaller doesn’t seem to be invoked on driver update.
Uninstall is
>> different and there is no problem because devnode in the
registry is
>> deleted. But users prefer update.
>>
>> DelReg in downlevel version is what I’m just doing and
still see ugly
>> surprises… It is for Win7 and above so it is possible to
give update
>> to legacy driver and say old version don’t support Win7.
>> Anyway, driver
>> has to be signed for Win7 so not a big deal if we don’t
>> already have it
>> signed :-/
>>
>> Best regards,
>>
>> Michal Vodicka
>> UPEK, Inc.
>> [xxxxx@upek.com, http://www.upek.com]
>>
>>
>>
>>> -----Original Message-----
>>> From: xxxxx@lists.osr.com
>>> [mailto:xxxxx@lists.osr.com] On Behalf Of David
>>> R. Cattley
>>> Sent: Tuesday, May 26, 2009 2:12 AM
>>> To: Windows System Software Devs Interest List
>>> Subject: RE: [ntdev] How to perform registry cleanup on
>> driver update?
>>> A coinstaller? It can see the uninstall and ‘clean-up’.
>>>
>>> DelReg sections along with the AddReg sections to ‘clear’
>>> whatever might
>>> have been in place prior? This will probably not work as it
>>> would have to
>>> be implemented in the ‘downlevel’ version which is out the
>>> door, right?
>>>
>>> -dave
>>>
>>> -----Original Message-----
>>> From: xxxxx@lists.osr.com
>>> [mailto:xxxxx@lists.osr.com] On Behalf Of
>> Michal Vodicka
>>> Sent: Monday, May 25, 2009 7:42 PM
>>> To: Windows System Software Devs Interest List
>>> Subject: RE: [ntdev] How to perform registry cleanup on
>> driver update?
>>> Nobody knows? OK, I can make registry cleanup in the legacy
>>> driver INF.
>>> But it seems I have to clean up also WDF registry values
which were
>>> created by WDF installation as w7 driver is WDF one. That’s weird.
>>>
>>> I mean following hardware key subkeys:
>>>
>>> - Device Parameters\WDF
>>> - Device Parameters\WUDF
>>> - Device Parameters\WUDFDiagnosticInfo
>>>
>>> I can’t believe cleanup should be done from other INF than created
>>> values and subkeys. But apparently WDF INFs don’t make any
>>> cleanup and I
>>> don’t see any way how to do cleanup from INF during driver
>>> update. Is it
>>> really so or am I missing something?
>>>
>>> Best regards,
>>>
>>> Michal Vodicka
>>> UPEK, Inc.
>>> [xxxxx@upek.com, http://www.upek.com]
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: xxxxx@lists.osr.com
>>>> [mailto:xxxxx@lists.osr.com] On Behalf Of
>>> Michal Vodicka
>>>> Sent: Saturday, May 23, 2009 5:07 AM
>>>> To: Windows System Software Devs Interest List
>>>> Subject: [ntdev] How to perform registry cleanup on
driver update?
>>>>
>>>> We have two drivers for the same devices/HW IDs, legacy and
>>> w7 driver.
>>>> w7 driver creates some registry values for device node
>> using AddReg
>>>> directive. For example:
>>>>
>>>> [w7_Device_AddReg]
>>>> HKR,“Exclusive”,0x10001,1
>>>>
>>>> w7 driver automatically is installed from WU but some
users prefer
>>>> legacy driver. They update driver using legacy INF and
>>>> everything is OK
>>>> except there are remaining registry values from previous
w7 driver
>>>> installation. They influence legacy driver behaviour and
>>> break legacy
>>>> app. For example, legacy app doesn’t expect legacy driver devices
>>>> exclusive. In turn, everything works if only legacy driver
>>>> was installed
>>>> and stops working when w7 driver was installed at first and
>>> updated to
>>>> legacy driver.
>>>>
>>>> My question is how to delete w7 values from the
registry. There is
>>>> DelReg INF section but it seems it should be included in
>>> legacy INF to
>>>> delete w7 values. I can hardly believe it but can’t find a
>>> way how to
>>>> make cleanup from w7 INF. Something which’d be called when w7
>>>> driver is
>>>> updated to something else which could delete all
>> installed registry
>>>> entries. Uninstalling and deleting driver using DM works but
>>>> it isn’t a
>>>> solution as users just update driver which is natural.
>>>>
>>>> Is there some way how to solve it purely by w7 INF change?
>>>>
>>>> Best regards,
>>>>
>>>> Michal Vodicka
>>>> UPEK, Inc.
>>>> [xxxxx@upek.com, http://www.upek.com]
>>>>
>>>> —


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

Honestly, I don’t know the true answer. My guess is that the properties fall into two categories: how the stack is built (upper/lower filters, service, etc) and the policy around the stack (exclusive, security descriptor, etc) as a whole.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Tuesday, May 26, 2009 7:48 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to perform registry cleanup on driver update?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Tuesday, May 26, 2009 4:05 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to perform registry cleanup on driver update?

By design. There are special values that get promoted into the parent
key. Exclusive is one of them. Upper/LowerFilters are 2 more. These
are all doc’ed in the AddReg section in the docs.

They are but I don’t see promotion to parent key documented. In addition, some of them are automatically deleted on update
(Lower/UpperFilters) and the remaining (which cause our problems) aren’t. It is pretty inconsistent. Why aren’t all special values deleted?

Best regards,

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


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

Doron Holan wrote:

> BTW, one of weird things is that HKR,“Exclusive”,… creates the value
under hw key whereas HKR,“SomethingElse” creates the value under hw key
Device Parameters subkey.

By design. There are special values that get promoted into the parent key. Exclusive is one of them. Upper/LowerFilters are 2 more. These are all doc’ed in the AddReg section in the docs.

d

Shouldn’t these special values be declared in the .HW section of new INFs?
Can you imagine cases when they must be declared in HKR, except of
auto-fixing legacy win9x compatible drivers?

Regards,
– pa

These do you have to be referenced in the .HW section of an INF, the promotion policy is not applied to any AddReg found in the INF

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Pavel A.
Sent: Tuesday, May 26, 2009 10:47 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to perform registry cleanup on driver update?

Doron Holan wrote:

> BTW, one of weird things is that HKR,“Exclusive”,… creates the
> value
under hw key whereas HKR,“SomethingElse” creates the value under hw
key Device Parameters subkey.

By design. There are special values that get promoted into the parent key. Exclusive is one of them. Upper/LowerFilters are 2 more. These are all doc’ed in the AddReg section in the docs.

d

Shouldn’t these special values be declared in the .HW section of new INFs?
Can you imagine cases when they must be declared in HKR, except of auto-fixing legacy win9x compatible drivers?

Regards,
– pa


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