TheRevenger Posted September 4, 2011 Posted September 4, 2011 (edited) This is just a start, it is brute and im shure there is a more elegant way to do it but i put it up if someone need a simple way. #NoTrayIcon Run(@SystemDir & "\Rundll32.exe Shell32.dll Control_RunDLLA hotplug.dll, vbNormalFocus",@SystemDir) BlockInput(1) WinWait("[CLASS:#32770; TITLE:Safely Remove Hardware]") WinActivate("[CLASS:#32770; TITLE:Safely Remove Hardware]") Send("!s") WinWait("[CLASS:#32770; TITLE:Stop a Hardware device]") WinActivate("[CLASS:#32770; TITLE:Stop a Hardware device]") Send("{ENTER}") WinWaitClose("[CLASS:#32770; TITLE:Stop a Hardware device]") Send("!{F4}") BlockInput(0) Hope it helps out USB EJ.au3 Edited September 4, 2011 by TheRevenger
jvanegmond Posted September 4, 2011 Posted September 4, 2011 This also works: but doesn't rely on automating user input that only works in an English Windows installation. It's all about CM_Request_Device_Eject. github.com/jvanegmond
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now