ning Posted September 13, 2005 Share Posted September 13, 2005 (edited) I have several USB memory sticks that I use a lot. I'm getting annoyed having to click the little icon to unplug them, and then getting a message that it's not ready to be unplugged, and having to click 'OK' and then repeat the process. OK, it's not going to kill me, but meh, why not have a script do it?You can probably do this neater using DLL calls, but this is all I've found so far. You need DevEject, a simple command-line program. I also use WinKey to assign programs (and scripts) to the Windows key + something - so I've set Win+Q to this script for ultimate laziness.ben[edit: You need the beta version to run this! As an aside, does anyone know when the next version (presumably incorporating those oh-so-useful StdOutRead, StdErrRead functions) will be released?]Unplug_devices.au3 Edited September 13, 2005 by ning Link to comment Share on other sites More sharing options...
w0uter Posted September 13, 2005 Share Posted September 13, 2005 i just have my settings on "fast remove" My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
ning Posted September 13, 2005 Author Share Posted September 13, 2005 Fast remove? Qué? Link to comment Share on other sites More sharing options...
w0uter Posted September 13, 2005 Share Posted September 13, 2005 i forgot where i set it... it allows me to just pull it out if it isnt busy. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
archrival Posted September 14, 2005 Share Posted September 14, 2005 (edited) You can either set the devices to allow write caching or not, with write caching off, it's possible to remove the device without fear of losing data. In Device Manager, double click on the drive, click on the Policies tab and you should have the option for Optimize for quick removal and Optimize for performance, which then allows you to set cache settings. Edited September 14, 2005 by archrival Link to comment Share on other sites More sharing options...
ryeguy Posted September 15, 2005 Share Posted September 15, 2005 You know autoit has a built in hotkey function. Link to comment Share on other sites More sharing options...
ning Posted September 15, 2005 Author Share Posted September 15, 2005 I think the Policies tab that archrival mentions only appears in WinXP. I have Win2k, and it's not there. There is a greyed-out tick box marked 'Write cache enabled', which is unchecked, but Windows still complains if you just pull a drive out, even if it's definitely not being written to. Oh, and ryeguy - I do know AutoIt has a hotkey function - I'm talking about being able to call a script using a hotkey, rather than a specific function of a running script. Link to comment Share on other sites More sharing options...
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