Deleting registry keys when uninstalling NDIS IM driver

Dear all,

I implemented a program which installes and uninstalles NDIS IM driver-modifying Passthru example- with WDK bindview source code.
Then I couldn’t reinstall NDIS IM dirver without rebooting when I deleted registry keys related to NDIS IM recursively after uninstalling it.
However, when I uninstalled without deleting registry keys related to NDIS IM, I can reinstall it without rebooting.

Could you give me any explanation?
And is any method to reinstall NDIS IM driver after uninstalling it subject to deleting registry keys?

Please help me.

Which registry keys?

Dave Cattley

What keys? Nothing goes in the registry without a named path rooted in
one of the “well-known” roots typically HKLM/HKCU. So before we can
evaluate the issue, we need to know what keys you are concerned with
joe

Dear all,

I implemented a program which installes and uninstalles NDIS IM
driver-modifying Passthru example- with WDK bindview source code.
Then I couldn’t reinstall NDIS IM dirver without rebooting when I deleted
registry keys related to NDIS IM recursively after uninstalling it.
However, when I uninstalled without deleting registry keys related to NDIS
IM, I can reinstall it without rebooting.

Could you give me any explanation?
And is any method to reinstall NDIS IM driver after uninstalling it
subject to deleting registry keys?

Please help me.


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

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\Passthru,
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\PassthruMP

When installing, I found above keys.
I deleted them after uninstalling.
After that, reinstalling failed without rebooting.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@flounder.com
Sent: Wednesday, April 18, 2012 9:49 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Deleting registry keys when uninstalling NDIS IM driver

What keys? Nothing goes in the registry without a named path rooted in one
of the “well-known” roots typically HKLM/HKCU. So before we can evaluate
the issue, we need to know what keys you are concerned with
joe

Dear all,

I implemented a program which installes and uninstalles NDIS IM
driver-modifying Passthru example- with WDK bindview source code.
Then I couldn’t reinstall NDIS IM dirver without rebooting when I
deleted registry keys related to NDIS IM recursively after uninstalling
it.
However, when I uninstalled without deleting registry keys related to
NDIS IM, I can reinstall it without rebooting.

Could you give me any explanation?
And is any method to reinstall NDIS IM driver after uninstalling it
subject to deleting registry keys?

Please help me.


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

On 19-Apr-2012 03:16, Suwan Park wrote:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\Passthru,
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\PassthruMP

When installing, I found above keys.
I deleted them after uninstalling.
After that, reinstalling failed without rebooting.

Be careful when you edit the registry manually,
especially the part related to the services database.
This can result in all kinds of strange behavior,
that need a reboot to fix.
Then the services database in memory is rebuilt
and synchronized with the registry.
– pa

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@flounder.com
Sent: Wednesday, April 18, 2012 9:49 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Deleting registry keys when uninstalling NDIS IM driver

What keys? Nothing goes in the registry without a named path rooted in one
of the “well-known” roots typically HKLM/HKCU. So before we can evaluate
the issue, we need to know what keys you are concerned with
joe
> Dear all,
>
> I implemented a program which installes and uninstalles NDIS IM
> driver-modifying Passthru example- with WDK bindview source code.
> Then I couldn’t reinstall NDIS IM dirver without rebooting when I
> deleted registry keys related to NDIS IM recursively after uninstalling
it.
> However, when I uninstalled without deleting registry keys related to
> NDIS IM, I can reinstall it without rebooting.
>
> Could you give me any explanation?
> And is any method to reinstall NDIS IM driver after uninstalling it
> subject to deleting registry keys?
>
> Please help me.
>
> —

Pavel A wrote:

On 19-Apr-2012 03:16, Suwan Park wrote:
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\Passthru,
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\PassthruMP
>
> When installing, I found above keys.
> I deleted them after uninstalling.
> After that, reinstalling failed without rebooting.
Be careful when you edit the registry manually, especially the part related to the services database.
This can result in all kinds of strange behavior, that need a reboot to fix.
Then the services database in memory is rebuilt and synchronized with the registry.

Yes. Much better to do “sc delete passthru” and “sc delete
passthrump”. The sc command knows how to work through the Service
Control Manager.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I used DeleteService through OpenSCManager for deleting the registry keys.
All problems were solved and the registry keys were clearly removed.

Thank you.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Thursday, April 19, 2012 10:03 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Deleting registry keys when uninstalling NDIS IM driver

Pavel A wrote:

On 19-Apr-2012 03:16, Suwan Park wrote:
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\Passthru,
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\PassthruMP
>
> When installing, I found above keys.
> I deleted them after uninstalling.
> After that, reinstalling failed without rebooting.
Be careful when you edit the registry manually, especially the part
related to the services database.
This can result in all kinds of strange behavior, that need a reboot to
fix.
Then the services database in memory is rebuilt and synchronized with the
registry.

Yes. Much better to do “sc delete passthru” and “sc delete passthrump”.
The sc command knows how to work through the Service Control Manager.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


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

Did you consider just putting a RemoveServices section in your INF for
uninstall?

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Suwan Park
Sent: Wednesday, April 18, 2012 8:17 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Deleting registry keys when uninstalling NDIS IM driver

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\Passthru,
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\PassthruMP

When installing, I found above keys.
I deleted them after uninstalling.
After that, reinstalling failed without rebooting.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@flounder.com
Sent: Wednesday, April 18, 2012 9:49 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Deleting registry keys when uninstalling NDIS IM driver

What keys? Nothing goes in the registry without a named path rooted in one
of the “well-known” roots typically HKLM/HKCU. So before we can evaluate
the issue, we need to know what keys you are concerned with
joe

Dear all,

I implemented a program which installes and uninstalles NDIS IM
driver-modifying Passthru example- with WDK bindview source code.
Then I couldn’t reinstall NDIS IM dirver without rebooting when I
deleted registry keys related to NDIS IM recursively after
uninstalling
it.
However, when I uninstalled without deleting registry keys related to
NDIS IM, I can reinstall it without rebooting.

Could you give me any explanation?
And is any method to reinstall NDIS IM driver after uninstalling it
subject to deleting registry keys?

Please help me.


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

I used Passthru.inf file in WDK Source code as it is.
It just includes the remove part as following:

[Passthru.ndi.Remove]
DelFiles = Passthru.Files.Sys

It doesn’t seem to cover the part that removes the registries of the NDIS IM
driver
Is this wrong?
How can I fix it if it is?

I used DeleteService through OpenSCManager for deleting the registry keys
after uninstalling the NDIS IM driver through WDK bindview source code.
It seemed that all problems were solved and the registry keys were clearly
removed.
My method is wrong?
Can it be any problem for the future?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David R. Cattley
Sent: Thursday, April 19, 2012 8:42 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Deleting registry keys when uninstalling NDIS IM driver

Did you consider just putting a RemoveServices section in your INF for
uninstall?

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Suwan Park
Sent: Wednesday, April 18, 2012 8:17 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Deleting registry keys when uninstalling NDIS IM driver

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\Passthru,
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\PassthruMP

When installing, I found above keys.
I deleted them after uninstalling.
After that, reinstalling failed without rebooting.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@flounder.com
Sent: Wednesday, April 18, 2012 9:49 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Deleting registry keys when uninstalling NDIS IM driver

What keys? Nothing goes in the registry without a named path rooted in one
of the “well-known” roots typically HKLM/HKCU. So before we can evaluate
the issue, we need to know what keys you are concerned with
joe

Dear all,

I implemented a program which installes and uninstalles NDIS IM
driver-modifying Passthru example- with WDK bindview source code.
Then I couldn’t reinstall NDIS IM dirver without rebooting when I
deleted registry keys related to NDIS IM recursively after
uninstalling
it.
However, when I uninstalled without deleting registry keys related to
NDIS IM, I can reinstall it without rebooting.

Could you give me any explanation?
And is any method to reinstall NDIS IM driver after uninstalling it
subject to deleting registry keys?

Please help me.


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

Suwan Park wrote:

I used Passthru.inf file in WDK Source code as it is.
It just includes the remove part as following:

[Passthru.ndi.Remove]
DelFiles = Passthru.Files.Sys

It doesn’t seem to cover the part that removes the registries of the NDIS IM
driver
Is this wrong?

Not necessarily. The philosophy, in general, is that driver files and
registry entries should remain after an uninstall, but in a disabled state.

I used DeleteService through OpenSCManager for deleting the registry keys
after uninstalling the NDIS IM driver through WDK bindview source code.
It seemed that all problems were solved and the registry keys were clearly
removed.

What problems were solved by this?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

“Fix it” is not how I would phrase it. The sample is correct. It does not
require fixing. An IM driver is a hybrid of a NetService and Net (PnP)
driver. The driver service entry is really a PnP driver service entry and
like nearly all PnP drivers, the convention is that the service entry is not
removed since it will only ever be started if a DevNode requiring that
driver (service) is started.

That said, you can try adding a DelServices entry to the xxxx.ndi.Remove
section and see what happens.

I cannot recall if that was removed from the Passthru sample because it
caused issues on some platforms but at one time (IIRC) the sample did have
such a line.

In regards to the SCM - that is exactly the right way to do it *after* you
have removed the NetService associated with your IM driver and have ensured
that all virtual adapters created by your IM have been stopped.

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Suwan Park
Sent: Thursday, April 19, 2012 8:18 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Deleting registry keys when uninstalling NDIS IM driver

I used Passthru.inf file in WDK Source code as it is.
It just includes the remove part as following:

[Passthru.ndi.Remove]
DelFiles = Passthru.Files.Sys

It doesn’t seem to cover the part that removes the registries of the NDIS IM
driver Is this wrong?
How can I fix it if it is?

I used DeleteService through OpenSCManager for deleting the registry keys
after uninstalling the NDIS IM driver through WDK bindview source code.
It seemed that all problems were solved and the registry keys were clearly
removed.
My method is wrong?
Can it be any problem for the future?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David R. Cattley
Sent: Thursday, April 19, 2012 8:42 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Deleting registry keys when uninstalling NDIS IM driver

Did you consider just putting a RemoveServices section in your INF for
uninstall?

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Suwan Park
Sent: Wednesday, April 18, 2012 8:17 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Deleting registry keys when uninstalling NDIS IM driver

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\Passthru,
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\PassthruMP

When installing, I found above keys.
I deleted them after uninstalling.
After that, reinstalling failed without rebooting.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@flounder.com
Sent: Wednesday, April 18, 2012 9:49 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Deleting registry keys when uninstalling NDIS IM driver

What keys? Nothing goes in the registry without a named path rooted in one
of the “well-known” roots typically HKLM/HKCU. So before we can evaluate
the issue, we need to know what keys you are concerned with
joe

Dear all,

I implemented a program which installes and uninstalles NDIS IM
driver-modifying Passthru example- with WDK bindview source code.
Then I couldn’t reinstall NDIS IM dirver without rebooting when I
deleted registry keys related to NDIS IM recursively after
uninstalling
it.
However, when I uninstalled without deleting registry keys related to
NDIS IM, I can reinstall it without rebooting.

Could you give me any explanation?
And is any method to reinstall NDIS IM driver after uninstalling it
subject to deleting registry keys?

Please help me.


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