# Unmount in Windows

**URL:** <https://forum.rclone.org/t/unmount-in-windows/9057>\
**Category:** Help and Support\
**Created:** [March 9, 2019, 9:39am UTC](https://forum.rclone.org/t/unmount-in-windows/9057 "2019-03-09T09:39:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![caspertone2003](https://forum.rclone.org/letter_avatar_proxy/v4/letter/c/0ea827/32.png) [@caspertone2003](https://forum.rclone.org/u/caspertone2003)\
**Post date:** [March 9, 2019, 9:39am UTC](https://forum.rclone.org/t/unmount-in-windows/9057/1 "2019-03-09T09:39:10Z")

</div>

After searching in the forum I had been unable to find an answer. Sorry if I am a bad seeker…

I mount without issue in batch bats. I know that end of batch means unmounting.  
I would like to be able to unmount wihout user intervention and in the middle of the bat so to free the drive letter and be able to mount again.

Not found a way to unmount using a rclone command.

I launch the mount as start “LETTER” rclone mount as then I launch other operations in the batch, otherwise if I do not use start rclone mount does not return to the batch until killed.

And to unmount I use, as a workaround of not having rclone unmount, TASKKILL /F /FI “WINDOWTITLE eq LETTER”

While this does the unmount, it has other quirks, such as I cannot use /B (no window) because then I cannot kill the window. Perhaps I could find other ways to launch and the kill, but was unable as today.

Anyone could recommend another wat to unmount in a batch without user intervention?

In rclone mount documentation there are ways for Linux and OS X:  
Linux - fusermount -u /path/to/local/mount  
OS X -umount /path/to/local/mount

I am not sure if this is posible with rclone or needs to be done a winfsp level.  
I identified as interesting elements

> <https://github.com/billziss-gh/cgofuse/blob/v1.0.3/fuse/host.go#L459-L492>

[https://github.com/billziss-gh/winfsp/issues/47](https://github.com/billziss-gh/winfsp/issues/47) (winsfp not supporting command line unmmot ?)

TIA  
CT

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [March 9, 2019, 4:07pm UTC](https://forum.rclone.org/t/unmount-in-windows/9057/2 "2019-03-09T16:07:23Z")

</div>

[According to the author of WinFSP](https://github.com/billziss-gh/winfsp/issues/47#issuecomment-277778335)

> The proper way to unmount a file system that uses WinFsp-FUSE is by sending it a Ctrl-C. On Windows this is done by calling [`GenerateConsoleCtrlEvent`](https://msdn.microsoft.com/en-us/library/windows/desktop/ms683155(v=vs.85).aspx). On Cygwin you can also use `kill` or `pkill` to send it a `SIGTERM` , especially if you run it as a Cygwin daemon.

I don't think there is a windows system way of umounting WinFSP, so no equivalent to `umount` or `fusermount -u`.

It might be possible to add, let's say `core/quit` to the API which would quit rclone and do the unmount.

---

<div class="post-metadata">

**Author:** ![caspertone2003](https://forum.rclone.org/letter_avatar_proxy/v4/letter/c/0ea827/32.png) [@caspertone2003](https://forum.rclone.org/u/caspertone2003)\
**Post date:** [March 10, 2019, 10:47am UTC](https://forum.rclone.org/t/unmount-in-windows/9057/3 "2019-03-10T10:47:26Z")

</div>

Thanks.  
I am not sure what means the last phrase…

I cannot see what I can as a user do.

Would it be possible to enhance rclone with a unmount command?

On sending Control-C, I found also several executables that do it. A search for SendSignal and SendControl brings some of them.

I found very interesting

[https://web.archive.org/web/20170909040729/http://www.latenighthacking.com/projects/2003/sendSignal/](https://web.archive.org/web/20170909040729/http://www.latenighthacking.com/projects/2003/sendSignal/)

I will try with  
32bits [https://www.dropbox.com/s/r96jxglhkm4sjz2/SendSignalCtrlC.exe?dl=0](https://www.dropbox.com/s/r96jxglhkm4sjz2/SendSignalCtrlC.exe?dl=0)  
Clean as today by Virustotal [https://www.virustotal.com/#/file/bdd0a7c3f14d1105a81cbb32d75762dd948da10bb227bf27c9c4ff09654ee8a3/detection](https://www.virustotal.com/#/file/bdd0a7c3f14d1105a81cbb32d75762dd948da10bb227bf27c9c4ff09654ee8a3/detection)  
(this is for info for those interested; note that your safety is your call do not blame me…)

And  
64bits [https://www.dropbox.com/s/hhe0io7mcgcle1c/SendSignalCtrlC64.exe?dl=0](https://www.dropbox.com/s/hhe0io7mcgcle1c/SendSignalCtrlC64.exe?dl=0)  
Clean also by Virrustotal today  
[https://www.virustotal.com/#/file/29711209fed703199c7cc75b402e10708cdaaec9169a0b297167588308b3b58e/detection](https://www.virustotal.com/#/file/29711209fed703199c7cc75b402e10708cdaaec9169a0b297167588308b3b58e/detection)

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [March 10, 2019, 4:58pm UTC](https://forum.rclone.org/t/unmount-in-windows/9057/4 "2019-03-10T16:58:58Z")

</div>

> [@caspertone2003](#):
>
> I am not sure what means the last phrase…

That would let you quit rclone using the remote control...

So you'd run rclone as normal but with the `--rc` flag

```
rclone mount .... --rc

```

Then you could run

```
rclone rc core/quit

```

to quit rclone which should be enough to unmount the FS.

If you are running batch script simultaneiously then you would need to give each rc a different port with `--rc-addr localhost:12345`

SignalSend sounds like a reasonable solution if it works for you

---

<div class="post-metadata">

**Author:** ![caspertone2003](https://forum.rclone.org/letter_avatar_proxy/v4/letter/c/0ea827/32.png) [@caspertone2003](https://forum.rclone.org/u/caspertone2003)\
**Post date:** [March 10, 2019, 11:35pm UTC](https://forum.rclone.org/t/unmount-in-windows/9057/5 "2019-03-10T23:35:07Z")

</div>

Thanks, understood.  
I will use SignalSend then.  
CT

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [June 8, 2019, 11:35pm UTC](https://forum.rclone.org/t/unmount-in-windows/9057/6 "2019-06-08T23:35:10Z")

</div>

Closed on June 8, 2019, 11:35pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
