devcon.exe DDK sample question(s)

I am using the devcon sample to manual install a non plug-n-plug bus driver
we have. Now I get the following different behaviors in 2k, 2k3, xp and now
xp embedded. I can make all to work consistently except for xp embedded.
Let me describe the 2k, 2k3 and xp behavior.

Question is really number 4 below as that is the environment I need for this
to work.

(1) 2k works ok and i can install multiple times ok with devcon.exe. The
reason is that 2k was not removing all our device objects correctly and
hence I can use devcon.exe multiple times to install multiple devices.
(2) 2k3 still had the 2k behaviour.
(3) Now xp would indeed unload our driver and sense our coinstaller is not
handling update driver we would unload and devcon was causing me to fail.
As a simple fix I have an IOCTL I call before I do the devcon.exe in a
process and this then causes our driver to fail the QUERY_REMOVE and hence
the driver does not unload and then I can use devcon to install multiple
devices. Nice

So all the above have “work arounds”. I do not have alot of time to get
this to work hence I am using devcon.exe and I am using CreateProcess() from
within and exe that I have that allows the installation of multiple devices
we support and I can set them up from a text file that my exe using. The
important thing here is I am using devcon.exe to do the installation.

(4) Now XP Embedded is giving me a completely different behavior. I have
selected enough components to give me the Device Manager and also Software
Plug n Play devices.
Now it may be that I need a component but I do not know which and I am
pretty sure I have what I need. Now when I run devcon.exe from with with
XP Embedded even at the command I sometimes get an devcon failed. I am
using

devcon install myinf.inf my_hard_id

Now if I repeat the command above it will work sometimes I have to run it
couple of times.

Help
Mike Jones