MSFN Forum: Dismount/Remove USB - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Dismount/Remove USB Rate Topic: -----

#1 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 22 October 2009 - 04:17 PM

Is there anyway to make it seem(pretend) like a USB key has been unplugged from the system?


#2 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 6,989
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 22 October 2009 - 08:21 PM

As of PE v2.0, it seems to be pretty fast in the PnP of UFDs.

#3 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 23 October 2009 - 08:02 AM

Is there anyway to pretend that I have unplugged it thought via command line?

#4 User is offline   iamtheky 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 833
  • Joined: 11-November 08

Posted 23 October 2009 - 08:07 AM

http://quick.mixnmoj...sb-disk-ejector

how to use the command line

http://www.howtogeek.com/howto/windows-vis...ific-usb-drive/

This post has been edited by iamtheky: 23 October 2009 - 08:09 AM


#5 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 23 October 2009 - 09:30 AM

I install a driver when WinPE is loaded using DRVLOAD however the drivers does not kick in until the USB key is physically unplugged. I noticied that once the key is remove the registry detects the PCI device which was the driver I installed.
Any ideas?

#6 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 6,989
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 23 October 2009 - 10:57 AM

Why not inject the driver into your WIM? That way you wouldn't have to worry about Drvload

#7 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 28 October 2009 - 09:44 AM

I tried injecting the driver however the driver doesn't take affect until I plug in and remove a USB key.

#8 User is offline   Noise 

  • Windows Guru
  • PipPipPip
  • Group: Members
  • Posts: 425
  • Joined: 27-February 04

Posted 28 October 2009 - 01:26 PM

I've found in PE you have to inject the drivers using peimg (or dism), then edit the startnet.cmd file and drvload them also.

You could use a Diskpart script and the "rescan" command.

#9 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 28 October 2009 - 03:28 PM

View PostNoise, on Oct 28 2009, 03:26 PM, said:

I've found in PE you have to inject the drivers using peimg (or dism), then edit the startnet.cmd file and drvload them also.

You could use a Diskpart script and the "rescan" command.


Noise,

I have injected the drivers on the offline WinPE image and then you recommend that I edit the startnet.cmd to drvload them again?

#10 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 02 November 2009 - 02:44 PM

It seems like when I remove the USB the drvinst.exe process runs and once completed the driver is enabled and setup.... any ideas?

Once removed the driver actually takes effect on the system.

This post has been edited by Eagle710: 02 November 2009 - 03:34 PM


#11 User is offline   Noise 

  • Windows Guru
  • PipPipPip
  • Group: Members
  • Posts: 425
  • Joined: 27-February 04

Posted 02 November 2009 - 04:25 PM

Add this to your startnet.cmd in WinPE:
FOR /F %%i in ('DIR /B /ON "%SystemRoot%\inf\oem*.inf"') do (
	@ECHO	   Installing %%~ni
	DRVLOAD "%SystemRoot%\inf\%%~i" > NUL
)

Custom driver are injected in WinPE and their INF files are re-named to start with OEM. This little scriptlet loads all drivers at startup.

#12 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 04 November 2009 - 10:21 AM

I actually tried this:
If the name of the driver is net4.inf should i change the oem*.inf ?

This didn't work when I tried to use it both within the startnet.cmd and just running via command line it still requires me to remove the USB key in order for the PCI device to obtain an device ID.

This post has been edited by Eagle710: 04 November 2009 - 10:29 AM


#13 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 04 November 2009 - 11:02 AM

After having injected the driver into the offline WinPE image and checking which drivers are running on the system using DriverView it seems as though the driver is not running. Only when I remove the USB key does the driver appear as installed/activiated in WinPE. Any ideas?

#14 User is offline   Eagle710 

  • Member
  • PipPip
  • Group: Members
  • Posts: 159
  • Joined: 06-November 08

Posted 18 November 2009 - 08:07 AM

So I have not determined what cause the driver to kick in after I unplug the USB key. However, I have found this little MS tool called Devcon.exe which is similar to Device Manager but using command line. I simply added the following command line into my winpeshl.ini to run at start and this allowed for the driver to activate.

Devcon.exe, /rescan


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy