Published Explorer.exe and other applications close instantly after launch

Published Explorer.exe and other applications close instantly after launch

book

Article ID: CTX138069

calendar_today

Updated On:

Description

When a published application such as Explorer is started, it closes instantly.
Please note: this can also apply to many other applications that exhibit this behavior and not excluded to just explorer.exe.
This is a built-in timer in Terminal Services which dictates if a session is not fully launched before the timeout.

Notes:

  • Microsoft does not recommend using Explorer.exe as a published application. Because, the published Explorer.exe application runs as a separate process with a restricted access to the desktop.
  • The method of copying and renaming the Explorer.exe for example, Explorer2.exe is a widely used method. It is not recommended or supported by the Citrix Development Team. The session becomes unresponsive or slow when starting several instances of the renamed Explorer2.exe. These issues are the result of internal Explorer.exe dependencies that cannot be resolved without rewriting a large parts of the operating system kernel.

Environment

This software application is provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that: (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the software application be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the software application.

Resolution

When a Windows Explorer is published, it must be similar to publishing a Hosted application shortcut to C:\Windows\Explorer.exe with a parameter of the drive letter or the default path.

In this example, the h:\ drive is used.

User-added image

To resolve the issue, create a DWORD (32-bit) setting called LogoffCheckerStartupDelayInSeconds with value 10 in the following location:
Caution! Refer to the Disclaimer at the end of this article before using Registry Editor.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix\wfshell\TWI

Note: 
The registry setting written above doesn't work anymore in CVAD7.15 and later.
You need to configure via Policy [Logoff Checker Startup Delay] in CVAD7.15 and later.

Issue/Introduction

This article provides a workaround for the issue when a Published Explorer.exe closing instantly when started.

Additional Information

CTX128009 - Explorer.exe Fails to Launch
CTX133835 - Published Explorer not Visible in AppCenter Console
CTX922603 - How to Publish Explorer.exe with Specific Drives, Folders, or URLs