PDA

View Full Version : Why does the EXE end up in the DOC directory?


Krusty
04-29-2004, 04:20 AM
I must be an utter idiot but try as I might I can't get the right path to associate with a button, I always end up with the following:

File.Run("AutoPlay\\Docs\\DSSAR.EXE", "", "", SW_SHOWNORMAL, false);

I'm trying to create a CD with multiple directories which use DSSAR.EXE but the EXE does not support "Arguments" or "Paths" so it has to be in the same directories as the images.

No matter what I do the EXE insists on the path being to the "Docs" directory & will only work if I put the images in this directory, while this is a possible work around it doesn't allow for multiple directories which is essential for what I want to do.

I feel like a complete fool as I'm obviously missing a really simple point somewhere! Can some kind soul please point me in the right direction thanks? :)

Corey
04-29-2004, 04:30 AM
Hi. The "Working Directory" option of the File.Open() action might work... Give it a shot and let us know. :)

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

rhosk
04-29-2004, 04:48 AM
Sure, it will allow for multiple directories. Where are your images located?

If you put the path in "by default", the "default" is to copy the file you're trying to run "in" the Docs folder. This is by design. In short, if you type your path manually in the File.Run action, it will use that typed-in path. Give us the path to these images and we'll show you how to execute.

Krusty
04-29-2004, 05:00 AM
Ahhhh!!!

The secret was "Manual input" humble thanks! :)

This worked in a test situation:

File.Run("AutoPlay\\Images\\A\\DSSAR.EXE", "", "", SW_SHOWNORMAL, false);
File.Run("AutoPlay\\Images\\B\\DSSAR.EXE", "", "", SW_SHOWNORMAL, false);

Obviously you can't use the find file option as it places the EXE into the "Docs" directory by default (as rhosk kindly explained). I spent literally days going around in circles on this one. Many thanks rhosk & Corey. :p

Problem solved :)

rhosk
04-29-2004, 05:12 AM
---------- :)