Page 1 of 2

This Working Directory is Invalid

Posted: Thu Sep 29, 2016 7:36 pm
by dcipher
Hi

Since I upgraded to 9.50.9.22 I have web login user that reports "This working directory is invalid" but then runs the application anyway. The working directory is indeed correct and the application runs just fine. You can see the application running with the error message on the screen in TS_AlbertaFuels image.

On the same server we have another web login user using the same application and they do not have the "This working directory is invalid" error message. Instead the application is launched twice. You can see in the attached image that they only have one application assigned but it is launched twice.

Simon

Re: This Working Directory is Invalid

Posted: Thu Sep 29, 2016 7:57 pm
by hansen
I had a strange thing once, but if I went and re-created the application control, then it fixed the issue - can you try that? Might create a backup of ApplicationControl.ini before and then compare it to after you made the changes.

Re: This Working Directory is Invalid

Posted: Fri Sep 30, 2016 2:39 am
by dcipher
The application ini is the same even when I re-create it and I have re-installed the update and re-booted the server and the problem persists. I changed to the floating panel. The application launches and appears on the floating panel when all it should just shown on the float panel. So I have not idea where it is picking up the second duplicate entry.

Simon

Re: This Working Directory is Invalid

Posted: Fri Sep 30, 2016 2:48 am
by hansen
Can you post your ApplicationControl.ini or would it give away too much information?
Just interested if I could replicate it.
We've had a lot of issues with people double clicking on the Floating Panel, which then launches two instances of our application, but this results in a race-condition sometimes. I'm trying to create some hack, but would suggest TSplus to disable double clicks on the Floating Panel apps.

Re: This Working Directory is Invalid

Posted: Fri Sep 30, 2016 1:36 pm
by dcipher
Here is the AppControl.ini.

Code: Select all

Global parameters and Application Publishing setting.
You can edit this file using Notepad 
[Security]
block_mstsc=no
http=on
httport=80
ip_html_pages=192.168.10.16
httpip=
progressbar=yes
screensaver=no
WebServerRootPath=C:\Program Files (x86)\TSplus\Clients\www
alwaydesktop=no
defaultapppath=
no-default-application=
targetdirectory=%DESKTOP%
httpsport=443
targetfolder=%UserProfile%\Downloads
sessionname=Session
Comment: defaultapppath setting enable to specify one single application for everyone --> if no application has been assigned to users
Comment: If no-defautl-application is set to yes, then when no application has been assigned the session will -->logoff (instead of starting a default application)
[localisation]
lang=languk.ini
product=TSplus
[Icons]
copy_App_icons=yes
copy_Allusers_icons=no
[Global_client_settings]
ip_adress=
rdp_port=
domain=
defaultprt=3389
com=
smart=
preview=
allprt=
streaming=
disk=
prt=
wallpaper=
[App1]
appname=Microsoft Remote Desktop
path=
startup=
cmdline=
groups=
users=DW4\Administrator;DW4\TS_KardTech;DW4\TS_Sylogist
maximized=
minimized=
hide=
all_users=no
[App2]
appname=TSplus Remote Taskbar
path=
startup=
cmdline=
groups=
users=
maximized=
minimized=
hide=
all_users=no
[App3]
appname=FloatingPanel
path="C:\Program Files (x86)\TSplus\UserDesktop\FloatingPanel.exe"
startup="C:\Program Files (x86)\TSplus\UserDesktop"
cmdline=
groups=
users=
maximized=no
minimized=no
hide=no
all_users=no
[App4]
appname=Desktop folder
path=C:\Program Files (x86)\TSplus\UserDesktop\files\folder.exe
startup=C:\Windows\System32
users=
groups=
[App5]
appname=Notepad
path=C:\Windows\System32\Notepad.exe
startup=C:\Windows\System32
users=
groups=
[App6]
appname=KardPoll - Alberta Fuels
path=D:\KardTech\Customers\AlbertaFuelDist\KardPoll\dcmain.exe
startup=D:\KardTech\Customers\AlbertaFuelDist\KardPoll
cmdline=
groups=
users=DW4\TS_FlemingReid;DW4\TS_KardAllFS;DW4\TS_AlbertaFuelDistWb
maximized=no
minimized=no
hide=no
all_users=no
[App7]
appname=KardPoll - Ultra Fuels
path=D:\KardTech\Customers\AlbertaFuelDist\KardPoll\dcmain.exe
startup=D:\KardTech\Customers\AlbertaFuelDist\KardPoll
cmdline=
groups=
users=DW4\TS_UltraFuels
maximized=no
minimized=no
hide=no
all_users=no



Re: This Working Directory is Invalid

Posted: Fri Sep 30, 2016 2:27 pm
by hansen
That is weird, I'll give you that. I'm not able to reproduce at all.

Can you add a new file "dcmain.bat" next to the "dcmain.exe" and add the following code, and replace path in AppControl.ini

Code: Select all

@ECHO OFF
ECHO.%CD%
PAUSE
It should print "D:\KardTech\Customers\AlbertaFuelDist\KardPoll" every time.
Have you tried to contact http://support.tsplus.net ?

Re: This Working Directory is Invalid

Posted: Fri Sep 30, 2016 5:32 pm
by dcipher
Hi

I created the batch file and changed the Published application to dcmain.bat and you can see that the error still occurs but the batch files runs. The interesting thing is that the error message displays first before the batch file displays anything.

Simon

Re: This Working Directory is Invalid

Posted: Fri Sep 30, 2016 5:45 pm
by hansen
Okay, this is great, because then we know it's nothing to do with your app - and not even TSplus (I think).

My first idea would be security settings of the directory, which doesn't allow the user to list the folder.

If you change your path to C:\Windows\System32\cmd.exe (directory C:\Windows\System32\) and start it as the user and then try the following to see where you get an error:

Code: Select all

CD /D D:\
DIR
CD KardTech
DIR
CD Customers
DIR
CD AlbertaFuelDist
DIR
CD KardPoll
DIR
REM Lastly you can try to run the dcmain.bat
dcmain.bat

Re: This Working Directory is Invalid

Posted: Fri Sep 30, 2016 6:29 pm
by dcipher
Everything works just fine including the batch file.

Re: This Working Directory is Invalid

Posted: Fri Sep 30, 2016 7:05 pm
by hansen
Damn. Hoped that was the problem. But it doesn't show the error, when launching on the C-drive (like you did with the cmd.exe) ?

Seems like it's a drive switching issue. Is it possible to copy your application to C: - just temporarily to test.

I only have C-drive on my server, so just guessing about the drive switching issue. But then it might be a TSplus issue...