Menu
CCMEXEC.COM – Enterprise Mobility
  • Home
  • General
  • Configuration Manager
  • Windows 10
  • Intune
  • GitHub
  • Windows 11
  • About the author
CCMEXEC.COM – Enterprise Mobility

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

Posted on June 27, 2016August 24, 2017 by Jörgen Nilsson

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:
    OnedriveSetup1
  • 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.
    OnedriveUpdate5

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
    OnedriveUpdate
  4. Create a Package/program in Configuration Manager
  5. Add it to your Task Sequence
    OnedriveSetup7

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.
OnedriveUpdate6

  • OneDrive
  • Onedrive OSD
  • Update Onedrive
  • Windows 10
  • 2 thoughts on “Updating the builtin Onedrive client in Windows 10 1511 during OS deployment”

    1. baatch says:
      July 4, 2016 at 12:22 pm

      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?

      Reply
    2. TedLarsen says:
      September 27, 2017 at 11:52 pm

      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?

      Reply

    Leave a Reply Cancel reply

    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.

    My name is Jörgen Nilsson and I work as a Senior Consultant at Onevinn in Malmö, Sweden. This is my blog where I will share tips and stuff for my own and everyone elses use on Enterprise Mobility and Windows related topics.
    All code is provided "AS-IS" with no warranties.

    Tweets by ccmexec

    Recent Posts

    • Windows Servicing, Personal Teams and Success.cmd
    • Windows MDM Security Baseline – Settings Catalog
    • Configuring MS Edge Security Baseline v107 using Settings Catalog
    • Configuring Desktop App Installer using CSP and script?!
    • Customizing Taskbar and Start in Windows 11 22h2 with PowerShell

    ©2023 CCMEXEC.COM – Enterprise Mobility | WordPress Theme by Superb Themes
    This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Reject Read More
    Privacy & Cookies Policy

    Privacy Overview

    This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
    Necessary
    Always Enabled
    Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
    Non-necessary
    Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
    SAVE & ACCEPT