SOLVED

Start OneDrive when using a RemoteApp in WVD

Copper Contributor

Hi Guys,

 

I am testing with WVD in a Lab environment, and everything is working fine. I only have one thing that doesn't seem to work. OneDrive is starting when i'm using the "Full Desktop" mode in WVD, but when i start a RemoteApp, the OneDrive client isn't starting. 

 

Is this a WVD / FSLogix related issue? And how can i solve this?

 

Thanks,

 

Leon

78 Replies

@Cambo380 a solution that will work with Citrix XenApp is to start OneDrive.exe with a scheduled task. Just set it to run at user logon. Details forthcoming.

@Marcel Biebricher That did the trick, thanks! More people on other forums are talking about this setting as well, however, as you mentioned no documentation about what the value 2 means.

@Johan Voerman @DjTjon01 

We have been experiencing the same issues. We've tried using the reg keys however it doesnt work on the first login, it does then work if a user logs out and back in again.

 

The solution we have found is to publish a bat script as the remote app that launches the target app and also restarts the OneDrive sync client. This works on the first login from a clean profile:

@echo off
cd "%ProgramFiles%\Windows NT\Accessories\"
start wordpad.exe
taskkill /F /FI "USERNAME eq %username%" /IM OneDrive.exe 
cd "C:\Program Files (x86)\Microsoft OneDrive\"
start OneDrive.exe /background
exit

 

While this is quite dirty but it certainly does the job, better than making all users login once and then log out and back in again for KFM and FoD to work. 

@Rhys Williams

I tried that. It seems like OneDrive still opens and hangs once for every user at first login. Is this script all you had to change to make it work?

Hi,

Just to thank @racook for that registry key. Just migrated a file system to sharepoint and onedrive is where users get and save their files from remoteapp (thinstuff, btw) sessions.

Ended up adding a key for each user to avoid uninstalling user's onedrives and installing the per machine one.

Thanks! Life saver that one.

Even with EnableADAL=2 none of my full RD users do get auto login to OD

@Sebastian Cerazy What OS version are you using? Do you have the per-machine OD client installed and have the correct GPO settings applied?

Whatever OS MS provides for WVD in Azure (1909)

Client per-machine comes as default in that instll

 

Yes, I have the settings done in registry

 

User is still asked to login to OD

@Robin Hobo 

Hi,

 

I applied the 3 registry settings for One Drive. However when the app is selected it does not open as a window for the users as they need to do map to network drives. Is that possible to achieve?

 

RD 

@ronald2424 

 

Hi,

 

In my case, I´m relying on sharepoint and synced document libraries for that. So remote users save their documents to the server´s onedrive (I have a per user installation, but will be trying the per machine installation soon on another implementation), onedrive syncs to sharepoint and SP syncs to the user´s workstation.

Thank you for your input..
I am trying to use One Drive as a File Explorer substitute.
The initial launch and setup works perfectly. But when you try to launch One Drive subsequently, it gets launched in the system tray with no option to relaunch it onto the Desktop in File Explorer view. This would allow the users to K access the files in network shares.
Will really appreciate if someone can confirm if this is possible and point me to the right direction.

@racook As of now, I haven't found the official documentation about the registry keys needed to make OneDrive work with a RemoteApp. 

@luzmariae Hi, I´m using this one:

 

C:\Users\USER\AppData\Local\Microsoft\OneDrive\OneDrive.exe /background

 

here:

 

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RailRunonce

 

Got it on this post and it works ok (maybe 98 out 100 sessions).

Please notice this is on a per use install, not a per machine one.

 

Best regards.

@mirthrock 

i'm struggling with the same issue, after reading your advice I've tried but im having the "run as administrator" problem, can you kindly share how you wrote your batch file? I manually added my admin credentials as a test and found that OneDrive is not getting started... I have the following registry keys configured for autoconfigure OneDrive:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive]
"SilentAccountConfig"=dword:00000001
"FilesOnDemandEnabled"=dword:00000001

is that enough?

I have RailRunOnce key as well but this just worked one time, after couple days everything stopped working.

Hope you can guide me through this as I've been suffering for couple weeks.

Regards!!

 

@DannyBoy65 thanks for the reply!  I must have per machine as im using W10 multi session as a session host. the weird behavior here is that it does work but after couple days it stops. Running in circles here and MS nor O365 supports helps, I have 2 cases opened and they haven't provide the solution nor a clear path to follow... 

Hi @luzmariae !  I apologize but its been a while since I set this up.  I just went through my settings and there are a few things to note:

 

1) RailRunOnce must be enabled

2) OneDrive Installer must be Machine-Wide

3) I used GPOs to have OneDrive silently sign in users, use files-on-demand, sync specific SharePoint Libraries, and most importantly limit each user to one session.  This is very important as OneDrive has no idea how to log itself in if its running on multiple sessions for the same user.

4) If the accounts have 2FA enabled, I had to log in as the user to the FULL Remote Desktop experience, follow the OneDrive 2FA prompts, and then log off.  This is a bit of a pain since the 2FA prompts return every 60 days or so.  So sometimes, I need to log in as the user to the full remote desktop experience again to re-input the 2FA prompts.  If you don't use 2FA (or have your IP configured in the 2FA exceptions) this step isn't necessary.

 

After all that, I was able to launch a RemoteApp and have OneDrive launch in the background without any issues.

 

If you need more detail, let me know.  Happy to help where I can.

 

Edit: Updated with more information and clarity.

@mirthrock Thank you so much for reverting back!!!

I had more guidance from you in a single post than having two open cases with OneDrive and WVD...

I don't have 2FA for Onedrive, and the only point i'm not clear (completed as you did) is the point 4:

 I used GPOs to have OneDrive silently sign in users, use files-on-demand, sync specific SharePoint Libraries, and most importantly limit each user to one session.  Is too much to ask if I can see your GPO configuration for those settings? I will research also from my side but I would like to have your input as well.

 

Thank you again for your help!!

Hi @luzmariae!  Glad I could help.  Here are screenshots of my GPOs.  Make sure you apply them to the proper OUs for your organization.  And if you need anything else, don't hesitate to ask.  If this works for you, let us know on here so that others can use this method as well.

 

Good luck!

@mirthrock 

 

do you mind to explain more on which area to check or configure "have your IP configured in the 2FA exceptions"

 

is there a need to configure EnableADAL REG_DWORD=2 at HKCU\software\microsoft\onedrive?

 

Thanks

 

Sure @jrng !

 

Login to portal.azure.com and navigate to "Multifactor Authentication" (you may have to search for it in the Azure search bar).  Then under "Configure", click the link for "Additional Cloud-Based MFA Settings".  Then you'll see a box labeled "Skip multi-factor authentication requests from the following range of IP address subnets".  Add your public IP addresses and subnet mask in CIDR format.  Now, if a user authenticates from any of those IP addresses you added, they will not be prompted for 2FA.

 

Regarding the registry key, I don't think you need it.  I might be wrong, but if you're using Office 365, Modern Auth is enabled by default on Outlook (if its updated) and your tenant.  See here for more info:

https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/enable-or-disable-mo...

 

Hope that helps!