Windows 7 Forums


Reply
Thread Tools

USB Drive Unmount Command

 
 
BillW50
Guest
Posts: n/a
Thanked:
 
      03-17-2012
In news:,
Stan Brown wrote:
> On Fri, 16 Mar 2012 12:47:03 -0700, Gene Wirchenko wrote:
>>
>> Does anyone know of a command for unmounting a USB drive? I
>> frequently copy from system to system using batch files, and I would
>> like it if the drive could be unmounted at the end of the batch file.

>
> http://quick.mixnmojo.com/software/usb-disk-ejector


Oh nice Stan. I didn't know about this free one. As I use either:

Safely Remove Hardware better alternative
http://www.safelyremove.com/

Zentimo is an external storage manager
http://zentimo.com/

Both are from the same company and Zentimo has more features. But I
don't really use the extra features so I don't care which one I am
really using.

--
Bill
Gateway M465e ('06 era) - OE-QuoteFix v1.19.2
Centrino Core Duo T2400 1.83GHz - 2GB - Windows XP SP3


 
Reply With Quote
 
 
 
 
Paul
Guest
Posts: n/a
Thanked:
 
      03-17-2012
J. P. Gilliver (John) wrote:
> In message <>, Roger Mills
> <> writes:
>> On 16/03/2012 19:47, Gene Wirchenko wrote:
>>> Hello:
>>>
>>> Does anyone know of a command for unmounting a USB drive? I
>>> frequently copy from system to system using batch files, and I would
>>> like it if the drive could be unmounted at the end of the batch file.
>>>
>>> Sincerely,
>>>
>>> Gene Wirchenko

>>
>> Why not just use the built-in "Safely Remove Hardware" icon?

>
> Which you call from a batch file, how?


Maybe find a tool on Uwe's site ?

http://www.uwe-sieber.de/drivetools_e.html#RemoveDrive

http://www.uwe-sieber.de/usbstick_e.html

Paul
 
Reply With Quote
 
 
 
 
Stan Brown
Guest
Posts: n/a
Thanked:
 
      03-17-2012
On Sat, 17 Mar 2012 12:26:41 +0000, Roger Mills wrote:
>
> On 16/03/2012 19:47, Gene Wirchenko wrote:
> > Hello:
> >
> > Does anyone know of a command for unmounting a USB drive? I
> > frequently copy from system to system using batch files, and I would
> > like it if the drive could be unmounted at the end of the batch file.
> >
> > Sincerely,
> >
> > Gene Wirchenko

>
> Why not just use the built-in "Safely Remove Hardware" icon?


You quoted the reason: "I frequently copy from system to system using
batch files, and I would like it if the drive could be unmounted at
the end of the batch file."

I do the same thing as Gene, and I have the unmount command as part
of the batch file.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com
Shikata ga nai...
 
Reply With Quote
 
VanguardLH
Guest
Posts: n/a
Thanked:
 
      03-17-2012
Stan Brown wrote:

> Roger Mills wrote:
>>
>> Gene Wirchenko wrote:
>>
>>> Does anyone know of a command for unmounting a USB drive? I
>>> frequently copy from system to system using batch files, and I
>>> would like it if the drive could be unmounted at the end of the
>>> batch file.

>>
>> Why not just use the built-in "Safely Remove Hardware" icon?

>
> You quoted the reason: "I frequently copy from system to system using
> batch files, and I would like it if the drive could be unmounted at
> the end of the batch file."
>
> I do the same thing as Gene, and I have the unmount command as part
> of the batch file.


You mean you do that on some Linux/Unix host since those have the mount
and u[n]mount commands. For Windows, it is mountvol.exe for both
mounting and unmounting (as Dan already mentioned). Or maybe you
installed Cygwin on your installation of Windows to get those *NIX
commands.
 
Reply With Quote
 
BillW50
Guest
Posts: n/a
Thanked:
 
      03-17-2012
In news:jk2k1l$tlf$,
VanguardLH wrote:
> Stan Brown wrote:
>
>> Roger Mills wrote:
>>>
>>> Gene Wirchenko wrote:
>>>
>>>> Does anyone know of a command for unmounting a USB drive? I
>>>> frequently copy from system to system using batch files, and I
>>>> would like it if the drive could be unmounted at the end of the
>>>> batch file.
>>>
>>> Why not just use the built-in "Safely Remove Hardware" icon?

>>
>> You quoted the reason: "I frequently copy from system to system using
>> batch files, and I would like it if the drive could be unmounted at
>> the end of the batch file."
>>
>> I do the same thing as Gene, and I have the unmount command as part
>> of the batch file.

>
> You mean you do that on some Linux/Unix host since those have the
> mount and u[n]mount commands. For Windows, it is mountvol.exe for
> both mounting and unmounting (as Dan already mentioned). Or maybe you
> installed Cygwin on your installation of Windows to get those *NIX
> commands.


I am not sure how Stan is going to answer. But the following will do the
job too.

USB Disk Ejector (free)
http://quick.mixnmojo.com/software/usb-disk-ejector

USB Safely Remove (not free, except trial) - I use this one
http://www.safelyremove.com/

Zentimo (not free, except trial) - I use this one too
http://zentimo.com/

--
Bill
Gateway M465e ('06 era) - OE-QuoteFix v1.19.2
Centrino Core Duo T2400 1.83GHz - 2GB - Windows XP SP3


 
Reply With Quote
 
Joerg Jaeger
Guest
Posts: n/a
Thanked:
 
      03-18-2012
On 3/16/2012 12:47 PM, Gene Wirchenko wrote:
> Hello:
>
> Does anyone know of a command for unmounting a USB drive? I
> frequently copy from system to system using batch files, and I would
> like it if the drive could be unmounted at the end of the batch file.
>
> Sincerely,
>
> Gene Wirchenko


As far as i know Windows does not use a cache for usb devices unlike *nix.
With *nix you do need really to unmount a usb device since the cache may
not be written completely.
Windows, from what i was reading, does not have the same kind of approach.
Doesn't a simple unmount do the job (if needed)?

--
ACCESS DENIED...

/\_/\
____/ o o \
/~____ =ø= /
(______)__m_m) el cato
 
Reply With Quote
 
Joerg Jaeger
Guest
Posts: n/a
Thanked:
 
      03-18-2012
On 3/17/2012 9:22 PM, Joerg Jaeger wrote:
> On 3/16/2012 12:47 PM, Gene Wirchenko wrote:
>> Hello:
>>
>> Does anyone know of a command for unmounting a USB drive? I
>> frequently copy from system to system using batch files, and I would
>> like it if the drive could be unmounted at the end of the batch file.
>>
>> Sincerely,
>>
>> Gene Wirchenko

>
> As far as i know Windows does not use a cache for usb devices unlike *nix.
> With *nix you do need really to unmount a usb device since the cache may
> not be written completely.
> Windows, from what i was reading, does not have the same kind of approach.
> Doesn't a simple unmount do the job (if needed)?
>


Found this on the web. Maybe its of use.
http://blog.ashfame.com/2008/02/safe...s-system-tray/

--
ACCESS DENIED...

/\_/\
____/ o o \
/~____ =ø= /
(______)__m_m) el cato
 
Reply With Quote
 
Gene Wirchenko
Guest
Posts: n/a
Thanked:
 
      03-18-2012
****************************
* IMPORTANT WARNING BELOW! *
****************************

On Fri, 16 Mar 2012 20:10:30 -0500, DanS
<> wrote:

>Gene Wirchenko <> wrote in
>news::
>
>> Hello:
>>
>> Does anyone know of a command for unmounting a USB
>> drive? I
>> frequently copy from system to system using batch files,
>> and I would like it if the drive could be unmounted at the
>> end of the batch file.

>
>Hmmmmmm..................
>
>Does mountvol work on USB drives? .......probably not, but
>
>mountvol x: /d


WARNING: Do NOT do this! You probably do not want the result.

This will unmount the volume, but not the USB device. It deletes
the mount point. The USB drive will be recognised when mounted, and
Safely Remove Hardware will work for it, but there will be no drive
letter. Note that this drive letter deletion persists across a
reboot.

>http://ss64.com/nt/mountvol.html


The above is what I should have read first. Using it, I was able
to recover.

A bare
mountvol
will give a list of volume names of the form
\\?\Volume{<GUID value>}\
The one you just mucked up will have a statement that there are no
mount points. To patch it up, enter
mount <drive>:\ <volume name>
where <drive> is a drive letter -- I assume an unused one -- and
<volume name> is the volume name mucked up. You should then be able
to use the USB volume as a drive again. This change will persist.

>I wonder if this would be of any use to you....
>
><http://www.howtogeek.com/howto/windo...-or-hotkey-to-
>immediately-eject-a-specific-usb-drive/>


This worked. It is a GUI program that also works on the command
line. Any output is GUI.

Sincerely,

Gene Wirchenko
 
Reply With Quote
 
Gene Wirchenko
Guest
Posts: n/a
Thanked:
 
      03-18-2012
****************************
* IMPORTANT WARNING BELOW! *
****************************

On Sat, 17 Mar 2012 13:10:04 -0500, VanguardLH <> wrote:

>Stan Brown wrote:
>
>> Roger Mills wrote:
>>>
>>> Gene Wirchenko wrote:
>>>
>>>> Does anyone know of a command for unmounting a USB drive? I
>>>> frequently copy from system to system using batch files, and I
>>>> would like it if the drive could be unmounted at the end of the
>>>> batch file.
>>>
>>> Why not just use the built-in "Safely Remove Hardware" icon?

>>
>> You quoted the reason: "I frequently copy from system to system using
>> batch files, and I would like it if the drive could be unmounted at
>> the end of the batch file."
>>
>> I do the same thing as Gene, and I have the unmount command as part
>> of the batch file.

>
>You mean you do that on some Linux/Unix host since those have the mount
>and u[n]mount commands. For Windows, it is mountvol.exe for both
>mounting and unmounting (as Dan already mentioned). Or maybe you
>installed Cygwin on your installation of Windows to get those *NIX
>commands.


DO NOT DO THIS WITHOUT READING UP.

This unmounts the drive letter by deleting the mount point. It
will not unmount the USB device. The deletion persists across
rebooting. See my other post on how to recover.

Sincerely,

Gene Wirchenko
 
Reply With Quote
 
J. P. Gilliver (John)
Guest
Posts: n/a
Thanked:
 
      03-18-2012
In message <jk25rc$dlv$>, Paul <>
writes:
>J. P. Gilliver (John) wrote:
>> In message <>, Roger Mills
>> <> writes:
>>> On 16/03/2012 19:47, Gene Wirchenko wrote:
>>>> Hello:
>>>>
>>>> Does anyone know of a command for unmounting a USB drive? I
>>>> frequently copy from system to system using batch files, and I would
>>>> like it if the drive could be unmounted at the end of the batch file.
>>>>
>>>> Sincerely,
>>>>
>>>> Gene Wirchenko
>>>
>>> Why not just use the built-in "Safely Remove Hardware" icon?

>>
>> Which you call from a batch file, how?

>
>Maybe find a tool on Uwe's site ?
>
>http://www.uwe-sieber.de/drivetools_e.html#RemoveDrive
>
>http://www.uwe-sieber.de/usbstick_e.html
>
> Paul


I think Stan's http://quick.mixnmojo.com/software/usb-disk-ejector looks
like it will do the job too. I was really just pointing out to Roger
that Gene had asked (and Roger had quoted!) for a way that would work in
a batch file, and Roger had suggested using an icon. (I wish I'd kept
quiet now!)
--
J. P. Gilliver. UMRA: 1960/<1985 MB++G.5AL-IS-P--Ch++(p)Ar@T0H+Sh0!:`)DNAf

A good pun is its own reword.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to backup my drive C from a bootable USB drive ? mahanddeem Installation, Setup and Updates 0 01-16-2013 04:27 PM
Manage & secure your USB Drive with USB Security Utilities Nibiru2012 Security 0 08-13-2010 05:22 AM
Command Sending Problem Saidas Windows 7 Support 0 03-06-2010 04:45 PM
Modify install/boot disk to boot directly to command prompt KIZMET2010 Customization 1 02-21-2010 01:51 AM
Command prompt fails to open Cameron Windows 7 Support 2 07-18-2009 11:25 AM


All times are GMT +1. The time now is 06:26 PM.
W7Forums is an independent website and is not affiliated with Microsoft Corporation.