in reply to Safely Remove Hardware on Win32

According to Google and some page on the internet, Microsoft provides devcon, which is a command line tool to mount and unmount devices.