I have been using sync.exe from sysinternals to flush and eject removable media. I know that you can also do this from the icon in the system tray which brings up the "Safely Remove Hardware" dialog box.
I would like to do this from a script. Can someone give me a starting point? I would then need to trap if the drive could not be ejected because a process still has a file open on the removable media.
I got some results searching MS Scripting Center to determine (enumerate) the logical drive properties, but nothing on methods to do the above.
I would like to do this from a script. Can someone give me a starting point? I would then need to trap if the drive could not be ejected because a process still has a file open on the removable media.
I got some results searching MS Scripting Center to determine (enumerate) the logical drive properties, but nothing on methods to do the above.