When deploying Windows 10 1511 the builtin Onedrive client is now “old” and then it doesn’t support the same group policies as the new Onedrive Next Gen client does. Before we start some background information on the Onedrive client in Windows 10 1511.
- The onedrive client is installed in this location in the users profile at first logon “C:\Users\%Username%\AppData\Local\Microsoft\OneDrive\Versionnumber”
- It is installed from “C:\Windows\Syswow64\onedrivesetup.exe”
- The command that is run is when the user first logs in is placed in the runonce registry key in the default user hive:
- When a user first logs on to Windows 10 the Onedrive client is installed in the user profile and then it starts by updating itself to the latest version automatically.
However when a user is fast he/she can start the Onedrive client before the policies are applied that is why I started updating the Onedrivesetup.exe file during OS deployment then I know it is the latest version and it uses the “new” group policies and it is a bit faster for the end user as well.
It is really simple just replace the OnedriveSetup.exe file during OS deployment.
- Download the latest version of the Onedrive client
- Create a folder in your packagesource folder and place the Onedrivesetup.exe file in that folder.
- Create a simple .cmd file in the same folder with the below content will do the trick.
%SYSTEMROOT%\system32\takeown /f %SYSTEMROOT%\SysWOW64\OneDriveSetup.exe >> %SYSTEMROOT%\logs\Onedrive.log
%SYSTEMROOT%\system32\icacls %SYSTEMROOT%\SysWOW64\OneDriveSetup.exe /Grant System:(F) >> %SYSTEMROOT%\logs\Onedrive.log
Copy %~dp0onedrivesetup.exe %SYSTEMROOT%\SysWOW64\OneDriveSetup.exe >> %SYSTEMROOT%\logs\Onedrive.log /Y
- Create a Package/program in Configuration Manager
- Add it to your Task Sequence
After deployment the Onedrive client will never popup at first logon with the message that “An Update is being installed” and it will honor the “new” Group Policy settings as well. If they are configured correctly the user will be prompted to logon instead as shown below, and if you disabled “Personal” Onedrive it will not be permitted to use either.
Hi Jörgen, is it possible to not have the Onedrive popup at all if you set the group policy to block personal accounts?
I have done alot of testing and no matter what I do, as soon as I set the registry / GPO to block personal accounts the OneDrive popup will show.
Right right now I’m torn between blocking personal accounts and live with the Onedrive popup OR allow personal account and have no popup.
Do you have any idea?
Forgive me, but I think the instructions above are a bit hazy. It looks like the TS launches the OneDriveUpdate.exe in the package. If so, what is the purpose of the UpdateOneDrive.cmd file in the same folder? When is this run in the Task Sequence? Is this supposed to be run earlier in the process? Or does the OneDrivesetup.exe somehow use this .cmd file automatically?