# Struggles with getting onedrive mounted on Windows

**URL:** <https://forum.rclone.org/t/struggles-with-getting-onedrive-mounted-on-windows/30419>\
**Category:** Help and Support\
**Created:** [April 26, 2022, 7:06pm UTC](https://forum.rclone.org/t/struggles-with-getting-onedrive-mounted-on-windows/30419 "2022-04-26T19:06:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Friendly](https://forum.rclone.org/letter_avatar_proxy/v4/letter/f/b5e925/32.png) [@Friendly](https://forum.rclone.org/u/Friendly)\
**Post date:** [April 26, 2022, 7:06pm UTC](https://forum.rclone.org/t/struggles-with-getting-onedrive-mounted-on-windows/30419/1 "2022-04-26T19:06:19Z")

</div>

Hi there, I wanted to get rclone as a way to have my onedrive purely in the cloud vs. saving a copy to my PC.  
I have been trying to get it to mount on startup, first using a windows scheduler which was super annoying to have the cmd running all the time.  
Instead I saw nssm as a good solution, but I can not get it to actually work. Ofc I am adding the correct path, but under arguments it seems everyone has a different suggestion. To just get onedrive working I can do "rclone mount one-drive: Z:" for example. But putting just mount one-drive: Z: as the argument does not work. Neither does adding in the -vfs stuff or adding in the -config? Which idk if its a problem, but my config file seems to have been put in my appdata folder?  
After each attempt, I try to go under services to manually start it to see if it was successful.

Any advice would be appreciated, thanks!

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [April 26, 2022, 7:18pm UTC](https://forum.rclone.org/t/struggles-with-getting-onedrive-mounted-on-windows/30419/2 "2022-04-26T19:18:34Z")

</div>

hello and welcome to the forum,

> [@Friendly](#):
>
> windows scheduler which was super annoying to have the cmd running all the time.

i use task scheduler, to run `rclone mount` command, always works, never had issues.  
and easy to run any task, using the command line or script.

fwiw, never would try to run `rclone.exe mount`.  
with task scheduler or nssm, always execute a .cmd batch file,  
and the .cmd file will run the actual `rclone mount`

so, is the issue that the command prompt windows stays open?  
there are workarounds for that

---

<div class="post-metadata">

**Author:** ![Friendly](https://forum.rclone.org/letter_avatar_proxy/v4/letter/f/b5e925/32.png) [@Friendly](https://forum.rclone.org/u/Friendly)\
**Post date:** [April 26, 2022, 7:24pm UTC](https://forum.rclone.org/t/struggles-with-getting-onedrive-mounted-on-windows/30419/3 "2022-04-26T19:24:56Z")

</div>

Thanks for the help, yeah the problem is just that it stays open. So in task scheduler you mean to suggest selecting cmd as a the program and make the argument rclone mount?

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [April 26, 2022, 7:33pm UTC](https://forum.rclone.org/t/struggles-with-getting-onedrive-mounted-on-windows/30419/4 "2022-04-26T19:33:48Z")

</div>

> [@Friendly](#):
>
> the problem is just that it stays open

could try  
`--no-console Hide console window (supported on Windows only)`

could try

 ![image](https://forum.rclone.org/uploads/default/original/2X/8/86225bc2ed333fd5b35d407c5c82c0069182cd4e.png)

and when i use task scheduler, nssm, autohotkey, etc, to run command hidden all the time.  
to run a task  
`C:\Windows\System32\schtasks.exe /run /tn "rclone\cloud.daily"`

and to create a windows desktop shortcut or desktop icon,  
create a shortcut lnk

 ![image](https://forum.rclone.org/uploads/default/original/2X/2/264bf37b7cb10bc17a775f08971fc3f294508192.png)

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [April 26, 2022, 7:44pm UTC](https://forum.rclone.org/t/struggles-with-getting-onedrive-mounted-on-windows/30419/5 "2022-04-26T19:44:50Z")

</div>

> [@Friendly](#):
>
> Which idk if its a problem, but my config file seems to have been put in my appdata folder?

are you asking about location of the rclone config file?

---

<div class="post-metadata">

**Author:** ![Friendly](https://forum.rclone.org/letter_avatar_proxy/v4/letter/f/b5e925/32.png) [@Friendly](https://forum.rclone.org/u/Friendly)\
**Post date:** [April 26, 2022, 7:49pm UTC](https://forum.rclone.org/t/struggles-with-getting-onedrive-mounted-on-windows/30419/6 "2022-04-26T19:49:51Z")

</div>

Ah wow thank your for your detailed response!  
For the config file I was just wondering if that was screwing something up, as it seems to have been put in appdata vs. .config.

Regarding your advice, I made a .bat file which just contains rclone mount one-drive: Z: and I set auto scheduler to run it. This works vs. selecting the rclone.exe and adding the mounting as an argument. Though I end up at the same place with cmd running when I logon in order to keep the drive connected. To hide the cmd screen, do you mean put "--no-console Hide console window" in the argument line of the task scheduler?

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [April 26, 2022, 7:55pm UTC](https://forum.rclone.org/t/struggles-with-getting-onedrive-mounted-on-windows/30419/7 "2022-04-26T19:55:51Z")

</div>

`rclone mount --no-console`

---

<div class="post-metadata">

**Author:** ![Friendly](https://forum.rclone.org/letter_avatar_proxy/v4/letter/f/b5e925/32.png) [@Friendly](https://forum.rclone.org/u/Friendly)\
**Post date:** [April 26, 2022, 7:58pm UTC](https://forum.rclone.org/t/struggles-with-getting-onedrive-mounted-on-windows/30419/8 "2022-04-26T19:58:39Z")

</div>

Ahhh thanks! haha otherwise what ended up just now working too is making a vbs script, that points to the .bat file which has the mount.

Set WshShell = CreateObject("WScript.Shell")  
WshShell.Run chr(34) & "C:\Users\mat\Documents\rclone-v1.58.0-windows-amd64\Autostart.bat" & Chr(34), 0  
Set WshShell = Nothing

---

<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:** [April 29, 2022, 7:59pm UTC](https://forum.rclone.org/t/struggles-with-getting-onedrive-mounted-on-windows/30419/9 "2022-04-29T19:59:12Z")

</div>

Closed on April 29, 2022, 7:59pm UTC

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