OneDrive not starting Published Apps

If you’ve supported Citrix Virtual Apps, you’ve probably had this call. A user launches a published application, goes to save a file, and OneDrive isn’t there. The same user logs on to a full Citrix desktop and OneDrive starts normally.

It looks like a limitation of published applications, and for years it effectively was. Many older articles, forum threads and even vendor guides concluded that the OneDrive sync client simply wasn’t supported in this scenario.

That’s no longer true. Microsoft now states that the OneDrive sync app is supported in a remote app scenario hosted as a Citrix Virtual App, provided specific requirements are met (Microsoft Learn: Use the sync app on virtual desktops). So if OneDrive isn’t starting in a published application, check the platform configuration before reaching for registry workarounds.

Why OneDrive behaves differently in a published application

A full virtual desktop gives the user a normal Windows session, including the Windows shell. A published application is different. Citrix presents the application seamlessly, with the desktop that hosts it hidden from the user.

That matters for OneDrive because it isn’t an application that opens a window and exits. It’s a background sync client that needs to run inside the user’s Windows session, and it traditionally relied on the normal shell startup to launch. In remote application sessions, the usual startup mechanisms, such as Run keys and the “Start OneDrive when I sign in to Windows” option, historically didn’t behave as they do on a full desktop.

Citrix and Microsoft have since closed that gap. The key component on the Citrix side is Shellbridge.

It’s supported now: the requirements

Microsoft’s Citrix Virtual Apps guidance lists these prerequisites (Microsoft Learn: Use the sync app on virtual desktops):

  • Windows: Windows Server 2019 with KB5014022, Windows Server 2022 with KB5014021, Windows 10 with KB5014023, or Windows 11 with KB5014019.
  • Citrix: Citrix Virtual Apps and Desktops 7 2203 LTSR CU1 or later.
  • Shellbridge enabled. VDA 2212 and later enable it by default. Earlier supported VDAs, from 2203 LTSR CU1, need it enabled manually.
  • OneDrive installed per machine.
  • FSLogix. Microsoft states that FSLogix must be used with Citrix Virtual Apps for OneDrive to be supported.

Put together, the supported stack looks like this:

Windows Server 2019 / 2022 (with the listed update)
  -> CVAD 2203 LTSR CU1 or later, with Shellbridge enabled
  -> OneDrive installed per machine
  -> FSLogix profile
  -> OneDrive started from the machine Run key
  -> Silent sign-in where the environment supports it

That’s a big change from older advice, which is why installing OneDrive per user and adding a startup shortcut isn’t the right starting point for a supported deployment.

The supported setup, step by step

1. Install OneDrive per machine

On a shared session host, install OneDrive once for all users rather than into each user’s profile (Microsoft Learn: Install the sync app per machine). From an elevated prompt:

OneDriveSetup.exe /allusers

The executable then lives under Program Files, typically C:\Program Files\Microsoft OneDrive\OneDrive.exe. Older guides use a Program Files (x86) path, so confirm where it actually installed on your image rather than copying a path from an old article.

2. Confirm Shellbridge is enabled

On VDA 2212 or later, Shellbridge is on by default, so don’t add the registry value just because an older guide mentions it. Check your VDA version first. On a 2203 LTSR VDA, Microsoft documents enabling it with this value:

HKLM\SOFTWARE\Citrix\Citrix Virtual Desktop Agent
Name:  Shellbridge
Type:  REG_DWORD
Value: 1

To test it, open a command prompt inside a published app session and run:

start ms-settings:printers

If the Windows printer settings window opens, Shellbridge is working.

3. Start OneDrive from the machine Run key

Microsoft’s Citrix guidance starts OneDrive from the normal machine-level Run key:

REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v OneDrive /t REG_SZ /d "\"C:\Program Files\Microsoft OneDrive\OneDrive.exe\" /background"

This is exactly the kind of entry older articles said couldn’t work in a remote app session. With Shellbridge in place, it does. You don’t have to run the command by hand; deploying the same value through Group Policy or your image build is fine.

4. Use FSLogix, and don’t roam the OneDrive key

OneDrive is installed on the host, but each user’s OneDrive state has to persist between sessions, especially on non-persistent hosts. That’s why FSLogix is a requirement, not a nice-to-have. Without proper profile persistence, you can spend hours troubleshooting what looks like a startup problem when the real problem is that the user’s OneDrive state isn’t being kept.

Microsoft also warns not to roam HKEY_CURRENT_USER\Software\Microsoft\OneDrive\ in non-persistent VDI profiles. If another profile tool is roaming that key, it can cause exactly the sign-in and state problems you’re trying to fix.

5. Configure silent sign-in

Getting OneDrive to start and getting it to sign in are different problems. OneDrive can be running with the user not signed in, and that’s not a startup fault.

Microsoft recommends silent account configuration, which signs users in to OneDrive with the account they used to sign in to Windows. It works on devices joined to Microsoft Entra ID, including hybrid joined devices (Microsoft Learn: Silently configure user accounts). Microsoft also notes it won’t work for users who require multifactor authentication, so check how your Conditional Access policies apply to the session hosts. Where silent sign-in isn’t possible, plan for users to sign in once interactively.

6. Add OneDrive to Citrix logoff handling

Microsoft recommends adding OneDrive to the Citrix LogoffCheckSysModules value, so Citrix accounts for OneDrive and SharePoint processes when a user closes their last app:

HKLM\SYSTEM\CurrentControlSet\Control\Citrix\wfshell\TWI
Value name: LogoffCheckSysModules
Type:       REG_SZ
String:     OneDrive.exe, Microsoft.Sharepoint.exe

Check for an existing value first. LogoffCheckSysModules may already list other processes, and if you paste this string in as-is you’ll wipe them out. Append OneDrive’s entries to the existing list instead. Missing this step is a common cause of sessions that stay open after users close their published apps.

Troubleshooting

First, check whether OneDrive is actually running

Before changing anything, find out whether you have a startup problem or a sign-in problem. There’s a trap here. On a multi-session host, Get-Process OneDrive returns every user’s OneDrive process, not just the current user’s. If anyone else on that host has OneDrive running, the check looks like it passed even when this user’s instance never started.

Filter to the current session instead. Run this inside the affected user’s published app session:

$mySession = (Get-Process -Id $PID).SessionId
Get-Process OneDrive -ErrorAction SilentlyContinue |
    Where-Object SessionId -eq $mySession

If nothing comes back, it’s a startup problem. If OneDrive is running, stop changing startup entries and look at sign-in, profile persistence and Files On-Demand instead.

A practical sequence

  1. Windows version. Confirm the session host is a supported version with the listed update.
  2. VDA version and Shellbridge. Check the VDA version, and test Shellbridge with start ms-settings:printers.
  3. Installation. Confirm OneDrive is installed per machine, and note the actual executable path.
  4. Startup entry. Confirm the OneDrive value exists under HKLM\Software\Microsoft\Windows\CurrentVersion\Run and points at the right path.
  5. FSLogix. Confirm FSLogix is installed and handling the user’s profile, and that nothing is roaming the OneDrive HKCU key.
  6. Is it running? Use the session-filtered check above.
  7. Sign-in. If OneDrive is running but the user isn’t signed in, check silent account configuration, the device’s Entra join state, and whether Conditional Access requires MFA.
  8. Logoff. If sessions stay open after users close their apps, check LogoffCheckSysModules.

What about the older workarounds?

You’ll still find articles recommending RailRunOnce registry entries, runonce.exe /AlternateShellStartup, or batch wrappers that kill and relaunch OneDrive every time an app opens. These came from a time when there was no supported option, and they were never reliable. Wrapper scripts that forcibly kill OneDrive are particularly risky, because opening a second app can kill an instance that’s in the middle of syncing.

I wouldn’t build a modern deployment on any of them. If you find yourself writing a complicated startup script just to make OneDrive appear, go back and check whether the supported prerequisites are actually in place.

Azure Virtual Desktop has its own separate method for RemoteApp, using a Windows feature called the enhanced shell experience (Microsoft Learn: Launch OneDrive with a RemoteApp). It’s worth knowing about, but it doesn’t apply to Citrix, which uses Shellbridge.

What about Windows Server 2016?

Microsoft’s Citrix Virtual Apps prerequisites list Windows Server 2019 and 2022, not Server 2016. Server 2016 does appear in Microsoft’s broader list of operating systems supported for non-persistent virtual desktops with FSLogix, but not for this specific published app configuration.

If you’re building a new Citrix Virtual Apps platform and OneDrive is a requirement, design around the current supported matrix rather than trying to make Server 2016 behave like a modern VDA.

The takeaway

If OneDrive doesn’t start when a user launches a Citrix published application, don’t assume it’s unsupported. That was a fair conclusion from older documentation, but Microsoft’s current guidance is different. OneDrive is supported in Citrix Virtual Apps when the documented prerequisites are met.

The bigger lesson is that OneDrive in Citrix isn’t a startup shortcut problem. It’s a combination of the Windows version, Citrix Shellbridge, the installation mode, profile management, authentication and session logoff. Get those right, and OneDrive runs alongside your published applications without a collection of old RemoteApp registry tricks.

Sources

Leave a Reply

Your email address will not be published. Required fields are marked *