Jump to content

Eject usb flash drive with SRD.dll


mutleey
 Share

Recommended Posts

  • Moderators

This topic shows three ways to do it without the dll; why use an external file if you do not need to:

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

4 hours ago, mutleey said:

ModemJunki the dll in my project would look better but i will do some testing with the script you indicated .. thanks.

Do note that the version I linked is the original and does not have my modification for USB hard disks. The Zip contains the needed USB UDF.

To make the modification I have made simply look for:

("SELECT * FROM Win32_DiskDrive where InterfaceType = 'USB'")

and replace with:

("SELECT * FROM Win32_DiskDrive where MediaType LIKE '%Removable%' Or MediaType LIKE '%External%'")

This allows use for any USB connected drive, or you can modify the SELECT however you might need.

Always carry a towel.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...