Unable To Launch Applications When Using Path Variable(s) Instead Of The Absolute Path

Unable To Launch Applications When Using Path Variable(s) Instead Of The Absolute Path

book

Article ID: CTX209199

calendar_today

Updated On:

Description

Two issue can occur when publishing applications with Path Variables, 32 bit %ProgramFiles(x86)% | 64 bit - %ProgramW6432%,  instead of the Absolute Path C:\Program Files...

  1. When launching a 64 bit application using the %ProgramFiles% variable in the command line, the app fails to start. The issue happens if the 64 bit app is NOT the first app to start a new session. When the issue occurs, there is no error and the application never launches.
  2. When launching an application set with Path Variables instead of the Absolute Path, any subsequent launches will fail without an error message. The only applications that will launch subsequently are applications with the Absolute Path set. 

Resolution

You can try one of the following methods:

1. Use the absolution path to publish the application. (C:\Program Files\....) - For 32 bit and 64 bit applications. 
User-added image

2. Use %ProgramW6432% for 64-bit applications instead of %ProgramFiles%.
User-added image

Problem Cause

Upon application launch wfshell process (32-bit) will requests the application. It then proceeds to translate the %ProgramFiles% or %ProgramFiles(x86) path variable incorrectly causing the launch to fail.

Indicator in Traces: 
"Call LaunchApplicationW pAppName "FileZilla", pCmdLine ""%ProgramFiles%\FileZilla FTP Client\filezilla.exe""",""
"AL_LaunchApplicationW:expand environment variables for the application's command line[ hToken=0x4300220000075C, Command=":\Program Files (x86)\FileZilla FTP Client\filezilla.exe"" 

Issue/Introduction

When publishing a x64 application using the %ProgramFile% variable in the command line, the app fails to start. The issue happens if the 64 bit app is NOT the first app to start, if it is the one to start a new session, then it works fine.