Dear PMPC,
With the OneDrive Sync Agent being available in public preview as a 64-bit application, the current detection logic for the deployment of OneDrive has a flaw. In this instance, you are checking the HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\OneDriveSetup.exe registry key for detection details, however, the 64-bit version of course is writing the values here - HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OneDriveSetup.exe.
One other issue is if the end-user installs in user context as opposed to using the /AllUsers switch, the registry item required to check for detection is inside the HKCU hive.
In this instance if the public preview is in place on a machine, and the existing 32-bit only version is pushed with PMPC, it results in the agent being removed and replaced with a different architecture and potentially an older release.
Therefore depending on whether the application is targeted at a user group or device group, it should detect the presence of either the 64-bit or 32-bit in the correct context and only upgrade where the build number is of course higher than the installed version and matches the architecture installed.