Working directory not working?

avatar

Dear sir/madam,
I tried to execute several applications through RDM which do not work. I created the sessions through New Session and selected Other in the left part of the window. Here I selected the Command Line radio button, entered the executable name in the Run field and I entered the correct path in the Working Directory field. The exe file cannot be found however.
So I created a directory c:\temp containing a test.bat with the following lines:
echo test
pause
Afterwards I created a session (type command line), entered test.bat in the run field an I entered c:\temp as working dir. This doesn't work either, it results in the following error:
Unable to execute the command line ["test.bat"] with argument []
The system cannot find the file specified
So the working directory field doesn't seem to work properly in version 6.
Thanks in advance for your help!
Kind regards,
Eric van Loon

All Comments (8)

avatar

Hi,
I verified and the working directory is correctly set. I think that the problem is that there is a misunderstood between the working directory of the process and the working directory of RDM.

In your example you set the working directory to c:\Temp, but RDM try to start the test.bat in his work directory, which is the default installation path. This is the reason RDM is unable to find it.

You should set the command to C:\Temp\test.bas

Does it make sense ?

David Hervieux

avatar














Hi!
Ah, it works that way... bummer. I was hoping to create a single point of entry for executing all our applications, but that will not be possible then.
For instance, one of our applications is Java based and is started with this command:
"C:\Program Files\EMC\CLARiiON Disk Library\Console\Bin\JavaW.exe" -Xmx1g -Dsun.java2d.noddraw=true -Dsun.java2d.d3d=false -classpath xerces.jar;activation.jar;mailapi.jar;smtp.jar;jcommon-0.7.3.jar;jfreechart-0.9.7.jar;IPStorConsole.jar;. com.falconstor.ipsa
And I did set the working directory to "C:\Program Files\EMC\CLARiiON Disk Library\Console\Bin"
Because it starts looking for the java files in the RDM working directory instead of "C:\Program Files\EMC\CLARiiON Disk Library\Console\Bin" the program fails to execute...
I'll have to find a different solution then. Thanks.
Kind regards,
Eric van Loon
KLM Royal Dutch Airlines

avatar

This is the way Windows works. Maybe a environment variable could help, RDM handle it without any problem ?

David Hervieux

avatar



Windows has an option to specify a working directory (the Start in field in a shortcut settings).
If I read you explanation, I don't understand the function of the Working Directory field in the settings of a RDM session.
Kind regards,
Eric

avatar

Hi,
this is exactly the field I set, but RDM start the process by setting 3 fields:

- Executable
- Parameters
- Working directory

The error you received is because Windows can find the command. What I don't understand, why you don't enter the full path for the executable (C:\Temp\login.bat) ?
edited by dhervieux on 3/3/2011

David Hervieux

avatar







To prove that the working directory parameter is not working like it is supposed to work! If c:\temp is the working dir and I specify login.bat as executable, then it should try to find login.bat in the working directory first. Just compare it to a Windows shortcut. When I specify a working directory here (Start in parameter) you do not have to specify a full path in the target field, Windows will start looking in the Start in directory first for all files necessary.
A working directory parameter should make the application start to look for all it's files in this directory. The fact that it can't find the bat file, shows that it doesn't...
Kind regards,
Eric van Loon
KLM Royal Dutch Airlines

avatar

Hi,
I'm really sorry, I found a bug and fixed it. This work fine now. You can download the fixed version here:

http://remotedesktopmanager.com/download/Setup.RemoteDesktopManager.6.0.0.0a.exe

Thank you for your patience and all the explanation you gave me.

David Hervieux

avatar








Hi John! This version works fine, with my batch file as well as with the Java based application!! Thank you very much for fixing this!!!




You are very welcome!
Kind regards,
Eric van Loon