Hoodsie2018
Enthusiast
Enthusiast

Prevent OneDrive in system tray

We don't use OneDrive company wide though some users are allowed to for various reasons. For VDI I"ve been tasked with making sure it's not running in the system tray by default and jsut letting users launch it as needed. Is there a way to do this via DEM, or GPO or Registry? I've already checked the Run and RunOnce keys in the registry for HKLM but HKCU is set when users log in and it's definitely putting a OneDrive key in HKCU\Software\Microsoft\Windows\CurrentVersion\Run and RunOnce. How do I prevent this but not stop the app altogether? the Task Manager > Startup tab has OneDrive disabled already. 

We're using instant-clones with non-persistent floating desktops. 

0 Kudos
3 Replies
ijdemes
Expert
Expert

AFAIK this is set on computer level (GPO), to ENABLE:

 

Computer Configuration> Administrative Templates> Windows Components> OneDrive> Prevent the usage of OneDrive for File Storage

 

or registry:

 

HKEY_LOCAL_MACHINE> Software> Policies\ Microsoft\Windows\OneDrive

DisableFileSyncNGSC = 0 (Dword)

 

0 = enable

1 = disable

 

Maybe you can try setting this value using an logon task/elevated task (when using DEM 2006 or later), set it before profile archive import and configure it for the required users (condition). This is a brainwave and I am not sure about timing and the result in general, but maybe worth a try.


\\ Ivan
---
Twitter: @ivandemes
Blog: https://www.ivandemes.com
0 Kudos
Hoodsie2018
Enthusiast
Enthusiast

hmmm. but that's a system wide setting it looks like, correct? HKLM. we don't want all users to have no access. just not to launch it by default. a user could have a desktop shortcut that launches it if they desire, but not run for all users by default. and not disable for all users either. 

0 Kudos
ijdemes
Expert
Expert

I know it's HKLM. But since it's VDI non-persistent, it doesn't really matter. Imagine the following simple flow.

 

- user that needs onedrive logs on

- elevated task sets the HKLM value that ENABLES onedrive before profile archives are loaded

- onedrive is enabled for user, because it's enabled system wide (HKLM), and since it's single user desktop (VDI), this doesn't matter. it is reset after logoff

 

- user that doesn't need onedrive logs on

- elevated task sets the HKLM value that DISABLES onedrive before profile archives are loaded

- onedrive is disabled for user, because it's disabled system wide (HKLM), and since it's single user desktop (VDI), this doesn't matter. it is reset after logoff

 

Like I said, untested and just a brainwave, and maybe there are easier ways that I don't know of. Just trying to think out-of-the-box 😉


\\ Ivan
---
Twitter: @ivandemes
Blog: https://www.ivandemes.com
0 Kudos