5

I would like to know how to pause onedrive from syncing using a command in the cmd. I am doing this because I have my .minecraft folder shared in onedrive and when I am playing minecraft, it is really slow and onedrive tries to sync the data that is being used. Right now I have to pause it with right clicking the folder and clicking pause but I would like to know the code to stop it with cmd so I can made a .bat file to pause onedrive and then start minecraft. If anyone knows how to do this, please let me know.

Thanks, Kyle5953c

5
  • I am not aware of a method to control OneDrive from just a command console by itself. You can pause it through windows explorer though.
    – Ramhound
    Apr 7, 2015 at 18:26
  • You can write an AutoIt/AHK script I suppose to automate the right-clicking and pausing, then execution of Minecraft. As for script access to OneDrive sync directly, perhaps it's possible via PowerShell and the Live API: 1, 2, 3.
    – Karan
    Apr 7, 2015 at 19:01
  • I don't have a window s8.1 machine in front of me, but I'm pretty sure OneDrive still uses skydrive.exe in the \windows\system32\ folder. Try skydrive /shutdown to stop it... Apr 7, 2015 at 19:22
  • You can also use process -s onedrive.exe from beyondlogic to sleep the process. You run the same command line to resume.
    – Sun
    Apr 13, 2015 at 16:55
  • Have you tried: taskkill /f /im (onedrive's sync process)?
    – Roke
    Sep 14, 2015 at 14:20

4 Answers 4

3

You can stop it by running a batch file that will loop so it will stop onedrive until you exit:

:Loop
Taskkill /f /im onedrive.exe
Goto loop

If you want to do it manually, then simply just do Taskkill /f /im onedrive.exe

Please run this batch file once you have started minecraft. Tested on Windows 7

3

A more graceful way to stop OneDrive than TASKILL or PSSUSPEND is:

%LOCALAPPDATA%\Microsoft\OneDrive\OneDrive.exe /shutdown
1

Use pssuspend https://technet.microsoft.com/en-us/sysinternals/pssuspend

pssuspend onedrive minecraft pssuspend -r onedrive

0

I had the same problem, and I solved it as follows: Suspend (shutdown) Onedrive:

"%LOCALAPPDATA%\Microsoft\OneDrive\onedrive" /shutdown

Resume Onedrive:

start "OneDrive" /B "%LOCALAPPDATA%\Microsoft\OneDrive\onedrive" /background

Without the start command, Onedrive becomes a subtask of your batch command, and it never comes back. /background suppresses user prompts

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.