Start external programm: Working dir

Ask for help and post your question on how to use XnView Classic.

Moderators: helmut, XnTriq, xnview

Post Reply
User avatar
Peter2
XnThusiast
Posts: 1365
Joined: Thu Nov 24, 2005 3:07 pm
Location: CH

Start external programm: Working dir

Post by Peter2 »

I created a button which starts an external exe like x:\software\fun\test.exe.

But the "working dir / start in folder / execute in ..." can not be defined, and this is why "test.exe" has problems to find supporting files. Is there a way to define "working dir"?

Peter
XnViewMP <Current version> German, XnConvert <Current version>, Win 10
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Start external programm: Working dir

Post by xnview »

not currenlty :( perhaps i must use the pathname of xnview as current directory?
Pierre.
User avatar
Peter2
XnThusiast
Posts: 1365
Joined: Thu Nov 24, 2005 3:07 pm
Location: CH

Re: Start external programm: Working dir

Post by Peter2 »

xnview wrote:... perhaps i must use the pathname of xnview as current directory?
??

For me, I do not understand in detail the Windows option "working dir" and so on, but here is my situation:

- I have d:\software\main.exe.
- (Normally) I have also d:\software\sub.exe.

Main.exe has the code: "if find sub.exe then ...."; and I thought it searches always in the same folder. Doubleclick on main.exe works fine, but starting main.exe from a button in XnView brings "sub.exe not found". It seems that main.exe runs in some temp-location or somewhere else ...

Peter
XnViewMP <Current version> German, XnConvert <Current version>, Win 10
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Start external programm: Working dir

Post by xnview »

Ok, so i must use app dir as current dir
Pierre.
User avatar
Peter2
XnThusiast
Posts: 1365
Joined: Thu Nov 24, 2005 3:07 pm
Location: CH

Re: Start external programm: Working dir

Post by Peter2 »

xnview wrote:Ok, so i must use app dir as current dir
Better to add an extra option where the user can define the working dir (with app-dir as default).

Peter
XnViewMP <Current version> German, XnConvert <Current version>, Win 10
Post Reply