HalleMike Posted June 19, 2014 Share Posted June 19, 2014 (edited) Hello to all, I've written a little program with autoit which calls during running coded dates from a sd-card to sign in to special folders in my home network. On the end of the program it checks if the sd-card is still inserted. If yes, I get a message to remove it. Now I have always to click on the USB-Icon in systray to eject and remove the card properly. My wish is to integrate a function to do this in my little program so I can remove the card without any probs. I was looking around for a solution but couldn't find once. Oh, I don't want to use an external program like 'ejectmedia.exe' or anything like that. Is somebody there with a idea? Please excuse my bad English but I'm a German and did my realy very best. HalleMike Edited June 19, 2014 by HalleMike Link to comment Share on other sites More sharing options...
Wombat Posted June 19, 2014 Share Posted June 19, 2014 (edited) You will want to look at Diskpart for command line: http://technet.microsoft.com/en-us/library/bb490893.aspx Or Drivetools: http://www.uwe-sieber.de/drivetools_e.html For Diskpart do: Type diskpart and wait for the diskpart prompt (DISKPART>) Type list volume Note the volume number of the SD drive carefully (use listed properties such as drive letter, label, type and size for help) Type select volume <number>, where <number> is the volume number noted above Type remove all dismount Type exit to quit Diskpart If that works, then you should be able to script this using the run command ( I would absolutely certain that the SD card is the same volume EVERY time, aka this approach isn't a good idea if you or others will be plugging or unplugging other devices into your system/mounting other drives/mapping new drives while attempting this) Edited June 19, 2014 by Wombat Just look at us.Everything is backwards; everything is upside down. Doctors destroy health. Lawyers destroy justice. Universities destroy knowledge. Governments destroy freedom. The major media destroy information and religions destroy spirituality. ~ Michael Ellner The internet is our one and only hope at a truly free world, do not let them take it from us... Link to comment Share on other sites More sharing options...
mdwerne Posted June 19, 2014 Share Posted June 19, 2014 While this does not answer your question directly, you may find some useful information on identifying your SD card (which I assume you can already do) and ejecting USB drives via these posts. '?do=embed' frameborder='0' data-embedContent>> Search the forums, it's amazing what you'll find. Good luck!! Link to comment Share on other sites More sharing options...
HalleMike Posted June 20, 2014 Author Share Posted June 20, 2014 Thank you both for your answers. I'll try and let you know... Nice weekend ... 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