VMware Horizon Community
apelz
Enthusiast
Enthusiast

Windows 10 and Onedrive Setup

Hey guys,

we are running Windows 10 Enterprise as stateless VDIs. Everytime someone logs in, the OneDriveSetup is running and uses a lot of cpu usage for around 30-50s.

pastedImage_0.png

We disabled the OneDrive Usage with a group policy, but the setup is still running everytime.

Windows Updates are disabled!

Could someone successfull disable this?

regards

Alex

Reply
0 Kudos
9 Replies
mchadwick19
Hot Shot
Hot Shot

There are quite a few places that OneDrive has buried itself in in Win10. Perform the following steps from a command line on your master(assuming 64-bit OS):

taskkill /f /im OneDrive.exe

C:\Windows\System32\OneDriveSetup.exe /uninstall

Check under the following registry paths for OneDrive active setup keys. If there is one with ComponentID referencing OneDrive with a "StubPath" key - delete the stubpath key.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Active Setup\Installed Components

Load the default NTUSER.dat file and delete OneDrive activesetup stubpath keys in there as well:

HKU\<DEFAULT.dat>\SOFTWARE\Microsoft\Active Setup\Installed Components

HKU\<DEFAULT.dat>\SOFTWARE\WOW6432Node\Microsoft\Active Setup\Installed Components

Delete the directories for OneDrive under all user profiles (especially your Default user profile) and %ProgramData%. Also delete C:\OneDriveTemp.

If you want to remove the OneDrive links from File Explorer delete the two following registry keys if they exist:

HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}

HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}

I script this all in one .bat file that I run during my image setup. Feel free to do the same.

VDI Engineer VCP-DCV, VCP7-DTM, VCAP7-DTM Design
Reply
0 Kudos
mchadwick19
Hot Shot
Hot Shot

Also note - make sure you're not installing OneDrive with your office installation as well!

VDI Engineer VCP-DCV, VCP7-DTM, VCAP7-DTM Design
Reply
0 Kudos
apelz
Enthusiast
Enthusiast

Hi Mike,

awesome! Thanks a lot. I will test it!

Reply
0 Kudos
kevinpower
Enthusiast
Enthusiast

Hello,

Working on this problem with windows 10 build 1803

You can also delete the run registry key in the default profile

reg load "hku\Profile" "c:\users\Default User\NTUSER.DAT"

reg delete "hku\Profile\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f

reg unload "hku\Profile"

After deleting the OneDriveSetup key and doing a re-deploy, the Onedrivesetup.exe process will not be loaded.

Greetz,

Kevin

Reply
0 Kudos
ap_idb
Enthusiast
Enthusiast

Kevin, are you saying that your registry modification on it's own works, or in combination with what mchadwick19 stated?

Reply
0 Kudos
PaulMurphyCO
Enthusiast
Enthusiast

We ran into this as well and did what kevinpower suggested initially and it tested fine. As we have some users who may use OneDrive in the near future, we ended up just disabling the OneDriveSetup from running through group policy so that we can still use OneDrive later if needed.

pastedImage_0.png

Reply
0 Kudos
kevinpower
Enthusiast
Enthusiast

Hello Paul,

Great to hear!

Reply
0 Kudos
SummaCollege
Hot Shot
Hot Shot

You also have the option to change the install method to a system based installation. You need to install OneDrive in your golden image using the /allusers commandline switch and make use of a specific OneDrive version or newer: Install the sync client per machine | Microsoft Docs

This way Onedrive won't be automatically installed one every user login/profile creation.

This option is in preview, so might have issues (although i haven't seen any)

Reply
0 Kudos
kevinpower
Enthusiast
Enthusiast

The option to install onedrive on machine base works fine here, we faced some issues with saving the user configs with the result that sometimes the content of the user will be deleted in the cloud without a manual action pfffff....

For more information on that Has anyone successfully installed the OneDrive for Business Client in a non-persistent VDI environme...

the option to install onedrive on machine based is one step forward so that is good news

Reply
0 Kudos