Executables are run from FC directory instead of current

Bugs and issues.
Locked
Message
Author
axel668
Posts: 3
Joined: 30.11.2007, 10:16

Executables are run from FC directory instead of current

#1 Post by axel668 » 03.12.2007, 15:26

Hi !

When running a batch file by double- clicking in FreeCommander I would expect that it runs in the current directory, like in cmd or explorer. FC runs it from its own FC installation directory, which leads to "file not found" errors in my start.bat on my USB pen drive (which contains relative paths, for obvious reasons).

Could not test if the behaviour is the same for .exe files, but I suppose it is. This could lead to problems when running .exe / .bat files directly in FC, which is very common in a pen drive scenario ...

This is easy to work around, of course (start a DOS prompt) and low priority, but think it's a bug, anyway.

Best regards, A.

Marek
Author
Author
Posts: 2535
Joined: 10.04.2006, 07:48
Location: Germany
Contact:

#2 Post by Marek » 03.12.2007, 20:15

I know only the problem with 'open' from the context menu viewtopic.php?t=309.

I can not reproduce the problem for double-clicking.

acw1668
Posts: 2
Joined: 15.04.2011, 07:38

Re: Executables are run from FC directory instead of current

#3 Post by acw1668 » 15.04.2011, 07:40

I have the same issue when using Free Commander XE 0.0.0.532 public preview

Marek
Author
Author
Posts: 2535
Joined: 10.04.2006, 07:48
Location: Germany
Contact:

Re: Executables are run from FC directory instead of current

#4 Post by Marek » 15.04.2011, 14:58

Could you provide some description what does not work?

acw1668
Posts: 2
Joined: 15.04.2011, 07:38

Re: Executables are run from FC directory instead of current

#5 Post by acw1668 » 16.04.2011, 04:37

Create a batch file in, for example, c:\temp directory with the following content:

@echo off
echo Current directory is:
echo.
pwd
echo.
pause



Then, navigate to C:\temp directory in Free Commander XE (0.0.0.532 public preview), and double-click the batch file to run it. The output is:

Current directory is:

C:\Program Files\FreeCommander XE

Press any key to continue . . .

The current directory is supposed to be C:\temp, but now is the FC installed directory.

Marek
Author
Author
Posts: 2535
Joined: 10.04.2006, 07:48
Location: Germany
Contact:

Re: Executables are run from FC directory instead of current

#6 Post by Marek » 16.04.2011, 12:04

Your example was useful. It is fixed now.

Locked

Who is online

Users browsing this forum: No registered users and 99 guests