Problem
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"
K:\BARSQL\VFPEXE\v9ball.exe -cK:\BARSQL\VFPEXE\CONFIG.FPW
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
Solution
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
http://support.citrix.com/article/CTX131514
… 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:
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.
Thanks.
Post a Comment