Wednesday, January 23, 2013

Publishing a application in Citrix XenApp 6.5 with a working directory configured as a mapped drive throws the error: “The system cannot find the path specified. This working directory is invalid…”


You attempt to publish an application with a working directory that is configured to a mapped drive:


You’ve included the following in your batch file:

net use K: /delete /yes
net use K: "\\someFileServer\software"



You attempt to launch the application:


… but receive the following error:

The system cannot find the path specified.
This working directory is invalid: K:\someDirectory\someDirectory
Please consult help for more information



I’ve looked far and wide to see if there was a way to disable the working directory check that XenApp performs prior to launching the application and while Citrix actually has the following KB article:

How to Disable Application Installation Check Option in XenApp 6.5

… the KB is only to disable checking the Command line field rather than the Working directory.  Changing the working directory to the local drive:


… does not work for the application I was working with because while it would launch, it would fail with the following error:


The reason why the application is throwing the error is because the c:\ needs to be k:\.

The solution for this was to insert the following line just before the application is executable is launched:

cd /d "K:\BARSQL\vapps"


This will change the working directory that the application expects to be launched in.

1 comment:

Anonymous said...

Great workaround by using the "CD" command to change the working directory during the launching of the app. I struck an issue where i needed to copy and launch an app from %TEMP%\appname\ folder but folder didn't exist until the batch file to launch it actually runs.