How to Add a OneDrive Open or Close Context Menu in Windows 10


OneDrive is a cloud-based storage service where you can view, browse, upload, and share the files you saved online to OneDrive.

By default, OneDrive is set to start when you sign in to Windows to have all files in each folder you choose to sync in OneDrive on your PC is automatically kept in sync with your online OneDrive.

This tutorial will show you how to add a 'Open/Close OneDrive' desktop context menu that will allow users to quickly toggle to open and close OneDrive for syncing as needed in Windows 10. This can be handy if there are times you do not want OneDrive on your PC to sync until you open OneDrive next.

While you must be signed in as an administrator to be able to add or remove the context menu, all users on the PC will be able to use the context menu.


How does the context menu work?

When you right click or press and hold on your desktop and click/tap on the Open/Close OneDrive context menu, it will check to see if the OneDrive.exe process is currently running or not.

If the OneDrive.exe process is running, then the process will be killed (end task) to close OneDrive and stop syncing with your online OneDrive. You will get the notification below to let you know that OneDrive is now closed. (If you have OneDrive set to start when you sign in to Windows, then OneDrive will automatically start again after you sign in to Windows next.)

Add Open or Close OneDrive Context Menu in Windows 10-onedrive_closed.jpg

If the OneDrive.exe process is not running, then it will be started to open and run OneDrive to start syncing with your online OneDrive. OneDrive will open, and you will get the notification below to let you know that OneDrive is now running.

Add Open or Close OneDrive Context Menu in Windows 10-onedrive_running.jpg


Contents

  • Option One: Add 'Open/Close OneDrive" to Desktop Context Menu
  • Option Two: Remove 'Open/Close OneDrive" from Desktop Context Menu



EXAMPLE: 'Open/Close OneDrive' desktop context menu
Add Open or Close OneDrive Context Menu in Windows 10-open-close_onedrive_context_menu.jpg






OPTION ONE

Add 'Open/Close OneDrive" to Desktop Context Menu


1 Click/tap on the Download button below to download the .zip file below.

Add_Open-Close_OneDrive_Context_Menu.zip

Download


2 Save the .zip file to your desktop, and unblock the .zip file.

3 Open the .zip file, and extract (drag and drop) the contents to your desktop.

4 Move the extracted Toggle_OneDrive.vbs file from step 3 above into the C:\Windows\System32 folder. If prompted, click/tap on Continue and Yes (UAC) to approve.


This .vbs file is what the context menu uses to perform the needed actions. The .vbs file will need to stay in the C:\Windows folder for the context menu to work.


5 Double click/tap on the extracted Add_Open-Close_OneDrive_to_Context_Menu.reg file from step 3 above to merge it.

This .reg file is what adds the desktop context menu for all users.

This .reg file references the .vbs file in step 4 above in the C:\Windows folder. If your Windows folder is not on the usual C: drive, then please post a reply to let me know what drive letter you have instead. I'll post a custom .reg file for you to use instead for your drive letter.


6 When prompted, click/tap on Yes (UAC), Yes, and OK to approve the merge.

7 If you like, you can delete the left over downloaded files on your desktop.






OPTION TWO

Remove 'Open/Close OneDrive" from Desktop Context Menu


1 Click/tap on the Download button below to download the .reg file below.

Remove_Open-Close_OneDrive_from_Context_Menu.reg

Download


2 Save the .reg file to your desktop.

3 Double click/tap on the .reg file to merge it.

4 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

5 Open File Explorer (Win+E), open the C:\Windows\System32 folder, and delete the Toggle_OneDrive.vbs file. If prompted, click/tap on Yes (UAC) to approve.

6 When finished, you can close File Explorer and delete the downloaded .reg file if you like.


That's it,
Shawn