Device Manager - deactivated device lasts one session only

S

Stefan Klein

When i deactivate my 'floppy device' in device manager everything looks
right (the device is indeed deactivated) but when i reboot XPe the
device is back. The device manager doesn't show a red cross but if i
select the device the 'enable' button appears (instead of disable) as if
it would be disabled indeed. Once the button is clicked it changes to
correct state (disable - for enabled devices).

Anyone know what's wrong?
There's no EWF or similar installed.
 
S

Stefan Klein

When i delete this key:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\FDC\GENERIC_FLOPPY_DRIVE\4&33bc18fa&0&0]
it reappears after reboot as if embedded would reinject that regkey at
every boot. Looks like the hardware is somehow "hardwired" in embedded.

What can i do? How can i analyze the problem? SysInternals
ProcessMonitor doesn't work. Complains about 'works in XP only'.
 
S

Stefan Klein

Stefan Klein wrote, on 12.04.2008 21:07:
When i delete this key:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\FDC\GENERIC_FLOPPY_DRIVE\4&33bc18fa&0&0]

it reappears after reboot as if embedded would reinject that regkey at
every boot.

The regkey mentioned above is versatile and computed at system startup.
It's normal that it vanishes after reboot. The really important one is this:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware
Profiles\Current\System\CurrentControlSet\Enum\FDC\GENERIC_FLOPPY_DRIVE\4&33BC18FA&0&0]
"CSConfigFlags"=dword:00000000

Setting 'CSConfigFlags' to '1' will de-activate the device after reboot
or if you enable/disable a state in device manager it will remain locked
to 'disabled'. So Windows Embedded is not able to change the key though
it reads and processes it if present.

Who's in charge for that key?
'Services.exe'. There are only two visible services in my XPPro system
that are associated with services.exe. 'Event Log' and 'Plug&Play'. I
bet my money on 'Plug&Play'.

Plug&Play is working fine but the device manager is still not running
properly.
'Plug&Play' is just half the truth. The actual process of disabling
hardware devices is not about setting registry keys. Its about using
APIs like 'SetupDiCallClassInstaller' so that CoInstallers or .inf
scripts can be parsed properly for de-/installation. These functions are
part of setupapi.dll. I don't know why these functions won't be properly
invoked in windows embedded. Maybe some prerequisites (regkeys?) are
missing.

I checked dependencies of devmgr.dll, setupapi.dll and services.exe.
'Query.dll' and 'mobsync.dll' were missing. I copied them manually to
the target system without any change.

The setupapi.log (set to max verbose) doesn't give any usable informations.

Maybe it just needs one more component from target designer. Not sure if
its possible to trace down APIs up to setupapi.dll.
 
S

SD

I have the same problem in our primary production XPe build where we
need to disable the Sermouse device. Disabling the device does not
stick through a reboot and deleting the device just gets recreated on
the next boot. I never figured out the missing dependency but we have
been able to work around the issue by setting the registry key:

HKLM\System\CurrentControlSet\Services\Sermouse[Start] = 4

this has been working reliably for 3+ years.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top