PDA

View Full Version : "Run from" directory setting?



jekyll700
09-13-2002, 01:56 PM
Hi all!
I just ran into an issue that appears to be a path issue when running an application from inside an AMS4 presentation.

[Scenario]

< ROOT of CD
--(AMS autorun .exe and .apm files here)
--< Data (dir my app files are in
----MyApp.exe
----MyAppExeNeedsThis.dll

Case 1: AMS4 autorun fires up, I select "Run MyApp" button, MyApp.exe runs, but it is missing a capability because it "can't find" the MyAppNeedsThis.dll file. It is looking for the file in the current path... which at this moment appears to be up one dir, where the AMS4 autorun app is running from.

Case 2: If a user Explores the CD and runs MyApp.exe from the "Data" folder, it runs fine and finds the MyAppNeedsThis.dll file just fine. So this tells me MyApp.exe is working as designed but the issue is a path issue.

If I recall correctly, in AMS3, I could not only choose the exe to run from the autorun app, I could choose the "Run from" directory. Is that true?? Whether it is or not is moot, as now I am using AMS4.

Now to the question at hand... Is there some way I can "tell" the system to run MyApp.exe using the path where MyApp.exe resides rather than the dir AMS4 is running from.

If not, does this mean I may need to pull MyApp.exe (and 200 support files for it) into the root of the CD?

< Apologies if this issue has been addressed before... I didn't see anything in FAQ's (which seem to be for AMS3 still) and a number of different searches of this forum did not provide any hits. >

kpsmith
09-13-2002, 02:04 PM
Let me preface by saying I haven't seen this happen but...

Did you try setting the working directory to the location the .exe and .dll are. I think this is similar to the setting you referred to in AMS3

jekyll700
09-13-2002, 02:15 PM
Please pardon me as an AMS4 newbie...
Thank you for the words "working directory"... I typed them in the search in the AMS4 Help file and whaddya know... it told me about a passing on a path as a command line parameter. And further, I just realized a "right click" on the action and then selecting "Properties" brings up the "working directory" option... and guess what?? Yup, sure enough, it is "%SrcDir%", not "%SrcDir%\Data" as I need it.

While I don't know this will solve the problem, I beleive it will.

Thanks again! It's great to have a forum like this where almost anytime there is someone to offer assistance.