Topic: Same USB won't recognize after being unplugged until you run Force Install USB  (Read 6835 times)

realdragonluv

  • Jr. Chef
  • **
  • Date Registered: Oct 2015
  • Posts: 21
First let me say thank you for doing these great projects.  I have used the Win 7 and Win 8 version in the past and they have come in very useful.  I'm currently trying toupdate to the Win 10 version but I'm coming across a small issue.  I will try to detail the issue as best I can.

1.  I boot into the Win10PE project from a USB stick and everything works great.  USB stick shows properly, Network works Etc.
2.  If I unplug that USB stick and then later plug that same stick back in it will no longer show on the machine.  If you go to device manger it now has an yellow exclamation point.  If you go to properties you get:

  Windows cannot load the device driver for this hardware.  The driver may be corrupted or missing. {Code 39}
  {Path Not Found}
  The path %hs does not exist.

(I have tried this on several different model Dell and HP's with the same result so it doesn't appear to be model specific)

3.  If I run the Force Install USB (HWPnp) it will usually fix the device and then start to show on the computer.  You can unplug and re-plug the device for a bit however the drive letter will disappear from explorer after a few moments.  You can still manually enter in the path/drive letter to navigate to the stick but obviously that isn't ideal either.

I've tried updating drivers, adding different drivers and it all results in the same issue.  This was not an issue in my Win8PE builds so I hope this is just something I overlooked in the Win10PE build I did.

Any help or advice on this matter would be greatly appreciated and keep up the excellent work.   :thumbsup:

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Hi and welcome realdragonluv

Thanks for your  nice words  :thumbsup:

I do not reproduce here, try maybe with:
Code: [Select]
devcon.exe disable USB\ROOT_HUB*
devcon.exe enable USB\ROOT_HUB*

realdragonluv

  • Jr. Chef
  • **
  • Date Registered: Oct 2015
  • Posts: 21
Good day,

Thank you for the quick reply.

I ran the command you suggested and after running the second one "Devcon.exe enable USB\ROOT_HUB*" it then shows an error for the following: USB Composite Device (Standard USB HUB Controller) It then has the same error "The path %hs does not exist" and the device is not working.  If I run the Force Install USB (HWPnp) application it fixes both that and the USB stick as before. 

Would you happen to know what path the variable %hs is supposed to be looking for?

The strange thing is if I have two USB drives plugged in I can switch/unplug/re-plug them all day long without issue as long as I leave one of them in.  It is only if I unplug all the USB drives and then try to reinsert them that it becomes an issue.  Very strange.

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
If I run the Force Install USB (HWPnp) application it fixes both that and the USB stick as before. 
To be sure:
So
Force Install USB (HWPnp)
fix trouble ???


The strange thing is if I have two USB drives plugged in I can switch/unplug/re-plug them all day long without issue as long as I leave one of them in.  It is only if I unplug all the USB drives and then try to reinsert them that it becomes an issue.  Very strange.
This gave me an idea to test:

See plugin:
\Downloads\ComponentsY\FakeDisk
1- Click Download
2- Click Refresh

Enable plugin:
\ComponentsY\FakeDisk

make your build,
test to see if your usb stick failure fixed ?

realdragonluv

  • Jr. Chef
  • **
  • Date Registered: Oct 2015
  • Posts: 21
To be sure:
So
Force Install USB (HWPnp)
fix trouble ???

Yes, if I run the Force Install USB (HWPnp) it fixes it.  On very rare occasions if I wait 15 min or so after I unplug the USB stick the same issue comes back the next time I reinsert the stick, but this scenario is rare (see below for more details on this). 

Side note: If I run "Force Install USB (HWPnp)" before I remove the stick it does not fix the issue, I must run it once the reinserted stick displays the warning in Device Manager.


This gave me an idea to test:

See plugin:
\Downloads\ComponentsY\FakeDisk
1- Click Download
2- Click Refresh

Enable plugin:
\ComponentsY\FakeDisk

make your build,
test to see if your usb stick failure fixed ?

Unfortunately this did not help with the initial issue.  I even tried one step further and assigning the "Fakedisk" a drive letter before removing the USB stick.  Unfortunately the same result, I must manually run "Force Install USB (HWPnp)" for the USB stick to work again, although FakeDisk does seems to have prevented the issue for re-occurring once fixed so one step closer. 


Side note: I modified an AutoIT script that is designed to auto run the "Force Install USB (HWPnp)" every time it detects a hardware change (as the system does detect it being inserted) and I got to work but it only runs one time so if a different device is inserted or if on subsequent removals and re-insertions the issue will on rare occasion return so the run once is not 100% effective.  Running "Force Install USB (HWPnp)" yet again does fix the issue again on the times where the error/issue does reoccur.

Thanks against for this support, help, and sugestions, it truly is appreciated.

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Big Thanks for very clear explanation realdragonluv  :thumbsup: :thumbsup: :thumbsup:

I add your very good post to FAQ
http://theoven.org/index.php?topic=834
Quote
Q: USB Flash Disk not work ?
A:
Same USB won't recognize after being unplugged until you run Force Install USB
See realdragonluv reply 4 http://TheOven.org/index.php?topic=2010.msg22605#msg22605


*
I wish we have a "Fake USB Flash Drive" to have usb driver alive, let us know if you find such thing one day.  :wink:

*
I feel any software will fail on your case since driver failure,
Still there is
Components\"HotPlug" plugin
 available providing some tools,
    If you have luck on them, let us know.  :thumbsup:

*
Also
Build\"1 -Copy Files" plugin
 There is File Copy: option, test with "Full"

*
At least we have a none automatic but working solution at hand "Force Install USB (HWPnp)"
 Thanks letting all know this fix such trouble.


Thanks again for good feedback.  :xmas-beer:

realdragonluv

  • Jr. Chef
  • **
  • Date Registered: Oct 2015
  • Posts: 21
I will try some other items you wrote as I have time.  Unfortunately this is just a side project so I try things as I have spare time.  I will certainly update here with any other discoveries.

I will say that one difference I noticed between the Win8PE that I have working and the win10PE which I have the issue is as follows, I don't know if this is related or not just trying to see what is different:

Win8PE the USB Root hub has the "Allow Computer to turn off this device to save power" is unchecked by default. 
On the Win 10 PE it is checked so in theory maybe the machine is putting the hub to sleep? 

Also Win8PE the "USB Mass Storage Device" doesn't have the Power Management tab available as an option so in theory is always awake
On Win 10 PE, it has the Power Management Tab and it has a check mark in the "Allow Computer to turn off this device to save power"

Keep up the awesome work!

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Thanks, this is cool finding  :great:

Win8PE the USB Root hub has the "Allow Computer to turn off this device to save power" is unchecked by default. 
On the Win 10 PE it is checked so in theory maybe the machine is putting the hub to sleep? 

ChrisR, JFX or others may have an idea on setting this.
 A good hint to follow if possible.  :great:

ps:
btw, Win8.1SE and Win8PESE are 2 different projects I do not know which one you refer to...
 and Win10PESE is quite different than Win 10 PE for anyone who have trouble and search forums it is better to write project name Win10PESE  :wink:

See You
:turtle:

realdragonluv

  • Jr. Chef
  • **
  • Date Registered: Oct 2015
  • Posts: 21
I apologize, if someone wants to correct my above post so as to not mess up the searches please feel free to do so.  I could not find a way to edit the post.

I will note that for future posts, that was my bad.

I looked on the machine information page and the two project I meant to put were Win8.1se (Sorry I didn't realize there was more than one for the Win 8 generations as I built that one a while ago) and win10PESE. 

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
I looked on the machine information page and the two project I meant to put were Win8.1se (Sorry I didn't realize there was more than one for the Win 8 generations as I built that one a while ago) and win10PESE.
Good to know  :great:

Win8.1SE has a unique feature to "Run as Admin"
 but ,I am not sure it effects your results.

Still, As a last addition to previous tests when you have time,
There is
Win10PESE\Finals\"Logon as Admin" Plugin

See You
:turtle:

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
I re-try to reproduce but I did not get it.
My usb stick remains active and I can plug/unplug it without worries.

With "Tweaks\Power Options" and with Disable USB Selective suspend enabled (default),
"Allow Computer to turn off this device to save power" is unchecked here for the USB Root hub.
And as you, It is checked for the USB Mass Storage Device.
I do not know if there is a way to disable it at build time (HKLM\SYSTEM\CurrentControlSet\Enum\USB\<hardwareIid>\<instanceId>)

Have you try to disable it manually, before unplug/plug your usb key ?

realdragonluv

  • Jr. Chef
  • **
  • Date Registered: Oct 2015
  • Posts: 21
Thank you for the added suggestions.
In reply to ChrisR:

I already had the box checked for "Disable USB Selective Suspend"

In reply to Lancelot:

I did have the Logon as Admin feature enabled with auto login as admin (0), so I changed the project to not include that and login as System instead.  That did resolve the USB issue, however nothing seems to run from the Autorun feature whereas when I login as Admin my custom apps would autorun as well as having my pinned shortcuts to the task bar.  So unfortunately when it logs in as System there is no NIC as well since the PE network application doesn't auto launch either (Am I missing something?).

So for a test I used the "For Testing Only" feature to login as system first and then switch to admin and the USB issue came back.  So it seems I will need to pick between the USB working or Getting all the apps to autorun.

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi realdragonluv,

Available plugins works fine.

To test:
\Downloads\AppYGS\Supplementary\Graphics\Desktop Clock Plus-7
- Download
- Refresh

Enable:
\AppsGS\Supplementary\Graphics\"Desktop Clock Plus-7" plugin

Make your build.

My Test results:
+
Build without \Finals\"Logon as Admin"
"Desktop Clock Plus-7" start at boot
+
Build with \Finals\"Logon as Admin"
After boot Select Admin "A"
"Desktop Clock Plus-7" start at boot


All works fine here.

***
I feel you need to check
FAQ http://theoven.org/index.php?topic=834.0
Q: How can I add a program to the startup?

:turtle:
« Last Edit: February 02, 2017, 02:13:53 PM by Lancelot »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
And realdragonluv,

update your
Finals\"Logon As Administrator" plugin
 (use green download button on plugin right top, near red button)

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
login as System instead.  That did resolve the USB issue,
...
So for a test I used the "For Testing Only" feature to login as system first and then switch to admin and the USB issue came back. 
Thanks for clarify this.

So we need something special for Admin session to avoid this failure.

Let us know your further discoveries.  :great:

Fros

  • Jr. Chef
  • **
  • Date Registered: Sep 2013
  • Posts: 10
I got the same issue this week.
I'm using the latest Win10PE scripts with a 1709-Source.

The first time the USB flash drive is connect, it gets correctly connected and gets a drive letter.
But this won't work a second time (unless another USB flash drive keeps connected).
The error was not affected by the user account (SYSTEM / Administrator). The behavior of the USB flash drives was the same (that they only work at the first time).

The solution for me was:
There is a wrong path to the USBSTOR.SYS in the registry (Entry "ImagePath" in the key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR").
The correct registry entry should be: \SystemRoot\System32\drivers\USBSTOR.SYS
But it actually is: System32\drivers\\SystemRoot\System32\drivers\USBSTOR.SYS

The reg-file with the correct entry is attached.

The content of the reg-file:
Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\USBSTOR]
"ImagePath"=hex(2):5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,64,00,72,\
  00,69,00,76,00,65,00,72,00,73,00,5c,00,55,00,53,00,42,00,53,00,54,00,4f,00,\
  52,00,2e,00,53,00,59,00,53,00,00,00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR]
"ImagePath"=hex(2):5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  74,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,64,00,72,\
  00,69,00,76,00,65,00,72,00,73,00,5c,00,55,00,53,00,42,00,53,00,54,00,4f,00,\
  52,00,2e,00,53,00,59,00,53,00,00,00



James

  • Grand Chef
  • *****
  • Location: USA
  • Date Registered: Dec 2017
  • Posts: 2272
Fros,

Win10 PESE - What Plugin ??
« Last Edit: September 21, 2018, 07:40:34 PM by James »

bob.omb

  • Moderator, Code Baker
  • Grand Chef
  • *****
  • Location: USA
  • Date Registered: Jul 2017
  • Posts: 1261
Not sure about v1709 but PESE is not creating these keys for v1803 source.  This may be unique to you..

Testing fine here with no changes to USBSTOR keys on my end from original project settings.  :thumbsup:

ila_rendered

ControlSet001 loads as CurrentControlSet for the running user profile..
« Last Edit: September 25, 2018, 02:07:01 AM by bob.omb »

Fros

  • Jr. Chef
  • **
  • Date Registered: Sep 2013
  • Posts: 10
Thanks for your reply.
I checked my image and there os also the correct path. But after the boot of the PESE, the path is incorrect.
Currently I set the path after the reboot (cause I thought this is a general problem).

I will check my driver configuration and the pecmd.ini.

Fros

  • Jr. Chef
  • **
  • Date Registered: Sep 2013
  • Posts: 10
This weird error in the ImagePath was not only in the USBSTOR key. A few other drivers were affected by this wrong "System32\drivers\\SystemRoot\System32\" path.

The solution was to disable the HwPnp plugin (the HwPnp.exe was also started at the startup via Autostart and pecmd).

 

Powered by EzPortal