hello,
can smeone tell me how to remove the ‘disable’ option when I right click on
a device in device manager? I see IBM’s think pad mouse device has done it,
and I want to implement the same. It would be good if the technique used can
actually also stop dev con too.
regards
B
> hello,
can smeone tell me how to remove the ‘disable’ option when I right
click
on a device in device manager? I see IBM’s think pad mouse device has
done
it, and I want to implement the same. It would be good if the
technique
used can actually also stop dev con too.
When you get IRP_MN_QUERY_PNP_DEVICE_STATE, set the
PNP_DEVICE_NOT_DISABLEABLE bit in the PNP_DEVICE_STATE structure.
Have a look at the help/docs for IRP_MN_QUERY_PNP_DEVICE_STATE.
It’s probably easier if you are using KMDF but I don’t know the exact
mechanism offhand.
James
Admins can disable your driver, no matter how it is installed.
This option is only to avoid occasional error of the users,
and maybe give them a hint (as well as “invisible in dev. manager”).
Regards,
–pa
Bedanto wrote:
hello,
can smeone tell me how to remove the ‘disable’ option when I right click
on a device in device manager? I see IBM’s think pad mouse device has
done it, and I want to implement the same. It would be good if the
technique used can actually also stop dev con too.
regards
B
Actually setting the bit prevents admins from disabling the device through device manager as well. This bit is not completely follproof though, the admin can edit the start type (change it to 4) directly in the service key to disable the service itself, but that requires a reboot to take affect.
d
Sent from my phone with no t9, all spilling mistakes are not intentional.
-----Original Message-----
From: Pavel A.
Sent: Monday, January 05, 2009 5:24 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] disable
Admins can disable your driver, no matter how it is installed.
This option is only to avoid occasional error of the users,
and maybe give them a hint (as well as “invisible in dev. manager”).
Regards,
–pa
Bedanto wrote:
> hello,
>
> can smeone tell me how to remove the ‘disable’ option when I right click
> on a device in device manager? I see IBM’s think pad mouse device has
> done it, and I want to implement the same. It would be good if the
> technique used can actually also stop dev con too.
>
> regards
>
> B
—
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
Bedanto wrote:
can smeone tell me how to remove the ‘disable’ option when I right
click on a device in device manager?
Why? What kind of device is so important that you think I should not be
able to disable it?
Please remember that it is MY computer, it is not YOUR computer. If I
want to disable your device on MY computer, that is my right.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
>Actually setting the bit prevents admins from disabling the device through device manager as well.
What about DEVCON and SetupDi APIs? will they also fail?
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
If this thread is talking about what I believe it is- the answer is “Yes”. There is a devnode flag that prevents being disabled, and SetupDi/CM in fact do honor that. One of several reasons WdfVerifier tool sometimes has to fall back to rebooting the machine to make KMDF verifier settings apply.
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Monday, January 05, 2009 11:35 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Re:disable
Actually setting the bit prevents admins from disabling the device through device manager as well.
What about DEVCON and SetupDi APIs? will they also fail?
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
Well both devcon and device manager both use setupapi.dll to do their work. the disableable policy is enforced at a lower level in the architecture, depending on the upper level components to enforce policy would lead to lack of enforcement 
d
Sent from my phone with no t9, all spilling mistakes are not intentional.
-----Original Message-----
From: Maxim S. Shatskih
Sent: Monday, January 05, 2009 11:56 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Re:disable
>Actually setting the bit prevents admins from disabling the device through device manager as well.
What about DEVCON and SetupDi APIs? will they also fail?
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.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