If you're using Slack with Citrix and having trouble launching the desktop app, learn more about this problem and how to fix it.
Issues launching Slack
What's causing this problem
Citrix environments, like XenApp and XenDesktop, use Dynamic-Link Library (DLL) redirection to route API calls that perform extra tasks before calling Windows operating system APIs.
Due to an incompatibility between the Slack desktop app and Citrix's third-party DLLs, Slack may fail to load in Citrix environments.
What you'll see when launching Slack
The Slack app will appear not to start after you attempt to launch it. However, if you open the task manager, you'll see slack.exe processes running. Slack may show up in the taskbar as well, but you won't be able to interact with the app.
Typically, the app will finish launching after about 15 minutes and perform normally – but you'll see multiple reports of the slack.exe process crashing from that time period.
Exempt slack.exe from DLL hooking
To resolve problems launching the Slack app, you can exempt specific processes from your Citrix environment's DLL hooking mechanism. You can either add registry values manually or run a PowerShell script to create registry values automatically.
Add the slack.exe registry value manually
From your computer, press the Win and R keys, then type regedit.exe.
Check for the following keys and add any that you can't see: HKEY_LOCAL_MACHINE/SOFTWARE/Citrix/CtxHook HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/Citrix/CtxHook HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/Citrix/CtxHook64
If it doesn't already exist, ensure to add a registry value to each key listed above:
If ExcludedImageNames already exists, make sure slack.exe is added to the names of executables, and ensure they are comma separated, like so: App1.exe,App2.exe,slack.exe
Check for the following key, and add it if it isn't there: HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/services/CtxUvi
If you added the key from step five, ensure that you also add the following registry value:
If UviProcessExcludes already exists, make sure to add slack.exe to the names of executables, separated by a semicolon, like so: App1.exe;App2.exe;slack.exe
When the download is complete, right-click the script file and select Run with PowerShell.
Reboot your machine, then re-launch the Slack desktop app.
Tip: If you're unable to run the PowerShell script because of an execution policy violation, follow Microsoft's documentation to update your computer's policies.