OneDrive Sync Client (pre release ver 21.022.0201.0001)not getting installed through Configuration Manager

LMS 156 Reputation points
2021-02-21T09:08:59.07+00:00

Hi

We follow below steps to install OneDrive Sync client to all end user machines using Configuration Manager

-> Copied the OneDrive.exe to a folder 21.022.0201.0001 under D:\OneDrive\ with CM server.
-> Created a new Application, Manually specified the application information, created a new deployment type, Manually specified the deployment information
Installation Program: OneDriveSetup.exe /AllUsers
Uninstall Program: %ProgramFiles(x86)%\Microsoft OneDrive\21.022.0201.0001\OneDriveSetup.exe /uninstall /allusers
Run installation and uninstall program as 32-bit process on 64-bit clients: Enabled
Add Clause (we will specify a Registry item for the Application Detection method) with below details
Setting Type: Registry
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\OneDrive
Value: Version
This registry key is associated with a 32-bit application on 64-bit systems: Enabled
Data Type: Version
This registry setting must satisfy the following rule to indicate the presence of this application: Enabled
Operator: Greater than or equal to
Value: 21.022.0201.0001
or
Setting Type: Registry
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Wow6432Node\Microsoft\OneDrive
Value: Version
This registry key is associated with a 32-bit application on 64-bit systems: Enabled
Data Type: Version
This registry setting must satisfy the following rule to indicate the presence of this application: Enabled
Operator: Greater than or equal to
Value: 21.022.0201.0001
Installation Behavior: Install for system
Logon Requirement: Whether or not a user is logged on
Installation program visibility: Hidden

**This allows the per-machine version to be detected independent of the underlying client architecture.

Created a new Task Sequence
Install Application, Name it, select the application,
Next we added a PowerShell script to our Task Sequence as mentioned earlier to remove the reference to the baked in OneDriveSetup.exe in “C:\Windows\SysWOW64\OneDriveSetup.exe”.
Enter the following script

Create PSDrive for HKU

New-PSDrive -PSProvider Registry -Name HKUDefaultHive -Root HKEY_USERS

Load Default User Hive

Reg Load "HKU\DefaultHive" "C:\Users\Default\NTUser.dat"

Set OneDriveSetup Variable

$OneDriveSetup = Get-ItemProperty "HKUDefaultHive:\DefaultHive\Software\Microsoft\Windows\CurrentVersion\Run" | Select -ExpandProperty "OneDriveSetup"

If Variable returns True, remove the OneDriveSetup Value

If ($OneDriveSetup) { Remove-ItemProperty -Path "HKUDefaultHive:\DefaultHive\Software\Microsoft\Windows\CurrentVersion\Run" -Name "OneDriveSetup" }

Unload Hive

Reg Unload "HKU\DefaultHive\"

Remove PSDrive HKUDefaultHive

Remove-PSDrive "HKUDefaultHive"

Change the PowerShell execution policy to Bypass


With most of the systems this works fine, some other systems it's not working (with Software center it's showing the status as waiting to Install). All the systems have some older versions Onedrive sync client installed and it's having sync issues with on-premise Sharepoint 2019, the one provided by Microsoft fixes the issue and we want to install this version with all client PCs

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,274 questions
OneDrive Management
OneDrive Management
OneDrive: A Microsoft file hosting and synchronization service.Management: The act or process of organizing, handling, directing or controlling something.
1,173 questions
Microsoft Configuration Manager Application
Microsoft Configuration Manager Application
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Application: A computer program designed to carry out a specific task other than one relating to the operation of the computer itself, typically to be used by end users.
465 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. LMS 156 Reputation points
    2021-02-22T06:16:59.82+00:00

    Any Update?

    We found that the installation not resuming with some PCs (with most of the systems configured Onedrive Sync client per user) and it succeeds after a restart or if we install manually with /AllUsers switch. Don't know how to fix this issue and why the installation freeze at some point

    0 comments No comments

  2. AllenLiu-MSFT 42,026 Reputation points Microsoft Vendor
    2021-02-22T06:47:01.08+00:00

    @LMS
    Thank you for posting in Microsoft Q&A forum.
    From SCCM side, we may first check the smsts.log and appenforce.log on the failed client machine to see why the installation failed.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. LMS 156 Reputation points
    2021-02-22T08:17:09.013+00:00

    Hi Allen

    On those machines where the installation stuck with Waiting for the installation doesn't have any reference with smsts.log and appenforce.log files. Maybe the installation waits for running onedrive.exe process to end or due to some other issues it didn't proceed. We are using /AllUsers switch with the installation, so it should be installed. Manually we can able to install with this switch.