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

%3CLINGO-SUB%20id%3D%22lingo-sub-2153078%22%20slang%3D%22en-US%22%3EOneDrive%20Sync%20Client%20(pre%20release%20ver%2021.022.0201.0001)not%20getting%20installed%20through%20CM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2153078%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EWe%20follow%20below%20steps%20to%20install%20OneDrive%20Sync%20client%20to%20all%20end%20user%20machines%20using%20Configuration%20Manager%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-%26gt%3B%20Copied%20the%20OneDrive.exe%20to%20a%20folder%2021.022.0201.0001%20under%20D%3A%5COneDrive%5C%20with%20CM%20server.%3CBR%20%2F%3E-%26gt%3B%20Created%20a%20new%20Application%2C%20Manually%20specified%20the%20application%20information%2C%20created%20a%20new%20deployment%20type%2C%20Manually%20specified%20the%20deployment%20information%3CBR%20%2F%3EInstallation%20Program%3A%20OneDriveSetup.exe%20%2FAllUsers%3CBR%20%2F%3EUninstall%20Program%3A%20%25ProgramFiles(x86)%25%5CMicrosoft%20OneDrive%5C21.022.0201.0001%5COneDriveSetup.exe%20%2Funinstall%20%2Fallusers%3CBR%20%2F%3ERun%20installation%20and%20uninstall%20program%20as%2032-bit%20process%20on%2064-bit%20clients%3A%20Enabled%3CBR%20%2F%3EAdd%20Clause%20(we%20will%20specify%20a%20Registry%20item%20for%20the%20Application%20Detection%20method)%20with%20below%20details%3CBR%20%2F%3ESetting%20Type%3A%20Registry%3CBR%20%2F%3EHive%3A%20HKEY_LOCAL_MACHINE%3CBR%20%2F%3EKey%3A%20SOFTWARE%5CMicrosoft%5COneDrive%3CBR%20%2F%3EValue%3A%20Version%3CBR%20%2F%3EThis%20registry%20key%20is%20associated%20with%20a%2032-bit%20application%20on%2064-bit%20systems%3A%20Enabled%3CBR%20%2F%3EData%20Type%3A%20Version%3CBR%20%2F%3EThis%20registry%20setting%20must%20satisfy%20the%20following%20rule%20to%20indicate%20the%20presence%20of%20this%20application%3A%20Enabled%3CBR%20%2F%3EOperator%3A%20Greater%20than%20or%20equal%20to%3CBR%20%2F%3EValue%3A%2021.022.0201.0001%3CBR%20%2F%3Eor%3CBR%20%2F%3ESetting%20Type%3A%20Registry%3CBR%20%2F%3EHive%3A%20HKEY_LOCAL_MACHINE%3CBR%20%2F%3EKey%3A%20SOFTWARE%5CWow6432Node%5CMicrosoft%5COneDrive%3CBR%20%2F%3EValue%3A%20Version%3CBR%20%2F%3EThis%20registry%20key%20is%20associated%20with%20a%2032-bit%20application%20on%2064-bit%20systems%3A%20Enabled%3CBR%20%2F%3EData%20Type%3A%20Version%3CBR%20%2F%3EThis%20registry%20setting%20must%20satisfy%20the%20following%20rule%20to%20indicate%20the%20presence%20of%20this%20application%3A%20Enabled%3CBR%20%2F%3EOperator%3A%20Greater%20than%20or%20equal%20to%3CBR%20%2F%3EValue%3A%2021.022.0201.0001%3CBR%20%2F%3EInstallation%20Behavior%3A%20Install%20for%20system%3CBR%20%2F%3ELogon%20Requirement%3A%20Whether%20or%20not%20a%20user%20is%20logged%20on%3CBR%20%2F%3EInstallation%20program%20visibility%3A%20Hidden%3C%2FP%3E%3CP%3E**This%20allows%20the%20per-machine%20version%20to%20be%20detected%20independent%20of%20the%20underlying%20client%20architecture.%3C%2FP%3E%3CP%3E-%26gt%3B%20Created%20a%20new%20Task%20Sequence%3CBR%20%2F%3EInstall%20Application%2C%20Name%20it%2C%20select%20the%20application%2C%3CBR%20%2F%3ENext%20we%20added%20a%20PowerShell%20script%20to%20our%20Task%20Sequence%20as%20mentioned%20earlier%20to%20remove%20the%20reference%20to%20the%20baked%20in%20OneDriveSetup.exe%20in%20%E2%80%9CC%3A%5CWindows%5CSysWOW64%5COneDriveSetup.exe%E2%80%9D.%3CBR%20%2F%3EEnter%20the%20following%20script%3C%2FP%3E%3CP%3ECreate%20PSDrive%20for%20HKU%3C%2FP%3E%3CP%3ENew-PSDrive%20-PSProvider%20Registry%20-Name%20HKUDefaultHive%20-Root%20HKEY_USERS%3C%2FP%3E%3CP%3ELoad%20Default%20User%20Hive%3C%2FP%3E%3CP%3EReg%20Load%20%22HKU%5CDefaultHive%22%20%22C%3A%5CUsers%5CDefault%5CNTUser.dat%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESet%20OneDriveSetup%20Variable%3C%2FP%3E%3CP%3E%24OneDriveSetup%20%3D%20Get-ItemProperty%20%22HKUDefaultHive%3A%5CDefaultHive%5CSoftware%5CMicrosoft%5CWindows%5CCurrentVersion%5CRun%22%20%7C%20Select%20-ExpandProperty%20%22OneDriveSetup%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20Variable%20returns%20True%2C%20remove%20the%20OneDriveSetup%20Value%3C%2FP%3E%3CP%3EIf%20(%24OneDriveSetup)%20%7B%20Remove-ItemProperty%20-Path%20%22HKUDefaultHive%3A%5CDefaultHive%5CSoftware%5CMicrosoft%5CWindows%5CCurrentVersion%5CRun%22%20-Name%20%22OneDriveSetup%22%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUnload%20Hive%3C%2FP%3E%3CP%3EReg%20Unload%20%22HKU%5CDefaultHive%5C%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERemove%20PSDrive%20HKUDefaultHive%3C%2FP%3E%3CP%3ERemove-PSDrive%20%22HKUDefaultHive%22%3C%2FP%3E%3CP%3EChange%20the%20PowerShell%20execution%20policy%20to%20Bypass%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWith%20most%20of%20the%20systems%20this%20works%20fine%2C%20some%20other%20systems%20it's%20not%20working%20(with%20Software%20center%20it's%20showing%20the%20status%20as%20waiting%20to%20Install).%20All%20the%20systems%20have%20some%20older%20versions%20of%20Onedrive%20sync%20client%20installed%20and%20it's%20having%20sync%20issues%20with%20on-premise%20Sharepoint%202019%2C%20the%20one%20provided%20by%20Microsoft%20fixes%20the%20issue%20and%20we%20want%20to%20install%20this%20version%20with%20all%20client%20PCs%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20found%20that%20the%20installation%20not%20resuming%20with%20some%20PCs%20(with%20most%20of%20the%20systems%20configured%20Onedrive%20Sync%20client%20per%20user)%20and%20it%20succeeds%20after%20a%20restart%20or%20if%20we%20install%20it%20manually%20with%20%2FAllUsers%20switch.%20Don't%20know%20how%20to%20fix%20this%20issue%20and%20why%20the%20installation%20freeze%20at%20some%20point%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2153078%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ECM%20current%20branch%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

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 of 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

 

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 it manually with /AllUsers switch. Don't know how to fix this issue and why the installation freeze at some point

0 Replies