When OneDrive is installed with Known Folder Move enabled, the first logon of a user starts with no redirection of known folders then midway through the session, they are redirected to the OneDrive folders.
How can I detect that?
I've already tried WM_SETTINGCHANGE and SHChangeNotifyRegister on CSIDL_Desktop to no avail.
It is a dirty undocumented hack, but if you monitor
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Foldersfor changes, it will trigger on redirection.A C# example of how to do so is: