Updating the builtin Onedrive client in Windows 10 1511 during OS deployment

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”OnedriveUpdate1
  • 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.

  1. Download the latest version of the Onedrive client
  2. Create a folder in your packagesource folder and place the Onedrivesetup.exe file in that folder.
  3. 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
  4. Create a Package/program in Configuration Manager
  5. 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.


Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.