PDA

View Full Version : Problem with external file



eric_darling
09-21-2004, 08:15 PM
I've built an AMS application that gets installed via a SUF 6 executable. Everything was working just great until I added a feature to the project, and now I'm getting a perplexing problem.

I have an option to run the project after installation - chosen via a checkbox on a the screen prior to the finish screen. It runs the program fine, and everything is normal. EXCEPT - I have added a feature to the AMS 4 project that enables a viewer to click a text object to load a PDF readme file externally (called What's New). I get the error that the file cannot load because it can't be found.

HOWEVER, when I re-run the program from its installed location on my hard drive, the link works just as expected! No more problems.

I tried rebuilding everything in both programs. I have no idea. Any ideas are appreciated.

JXBURNS
09-22-2004, 05:51 AM
My immediate thought is to check that the calling program for the PDF is correct. I have seen similar problems where the file association for PDF gets screwed and although opens fine if you double-click it, does not if called from another system. Turns out the system is trying to use a different version. Just my two-pennies worth and probably totally wrong.

John

eric_darling
09-22-2004, 11:05 AM
Right, well that doesn't explain why it works AFTER first run. Even if I don't launch the program automatically via Setup Factory (execute program command), when I launch it the first time manually from either the desktop shortcut that SUF 6 creates or from the shortcut inside the Start menu folder, it works fine. It just fails when SUF launches the program.

Any more ideas? (thanks anyway!)

JXBURNS
09-22-2004, 11:12 AM
Only other thought is whether you have told it to wait before continuing in the project? It could be that Acrobat is not given enough time during the set-up to launch itself before SUF6 tells it to close down if that action is not set. Or SUF6 thinks Acrobat has finished when it has not which may be a bug.

Alternative is to not use an Acrobat file but either a text or word file which may be quicker to load.

Would be interesting to see what happens with SUF7 which has a lot more functionality of course.

John

Adam
09-23-2004, 11:53 AM
Eric,

This is a strange error indeed. Does it matter what operating system the install was run on?

What happens if you install the program to a shorter path such as c:\folder rather than the Program Files directory?

What happens if you try to open that PDF file directly through Setup Factory? Does this open the file?

These are just tests to run to see what the issue could be.

Adam Kapilik

Worm
09-23-2004, 12:00 PM
Eric,

How are you making the call in AMS4? Are you using %SrcDir%? It kind of sounds like it might be a "Working Directory" issue, but I'm guessing.

eric_darling
09-24-2004, 09:12 AM
Eric,

How are you making the call in AMS4? Are you using %SrcDir%? It kind of sounds like it might be a "Working Directory" issue, but I'm guessing.

Yes, I'm using %SrcDir%. The PDF file is in the root directory of the CD.

eric_darling
09-24-2004, 09:18 AM
Eric,

This is a strange error indeed. Does it matter what operating system the install was run on?

What happens if you install the program to a shorter path such as c:\folder rather than the Program Files directory?

What happens if you try to open that PDF file directly through Setup Factory? Does this open the file?

These are just tests to run to see what the issue could be.

Adam Kapilik

Sorry, crazy last day and a half around here. I just got around to testing a couple of your questions out.

1) No, it doesn't matter what computer/OS. It's the same everywhere.
2) If I open the file directly through Setup Factory, it opens normally.
3) I haven't yet tried to install to a shorter path... No time right now to test that out - but I'll try to get back to it.

Thanks, Adam.

And now, we return you to your regularly scheduled hurricane (http://www.nhc.noaa.gov/ftp/graphics/AT11/refresh/AL1104W5+GIF/240903W5.gif). :wow

Brett
09-24-2004, 09:37 AM
What if you set the working directory when you call the app from SUF? Explicitly set the working folder in your file run action to be the same folder that the PDF file is in... not sure that this will work for sure, but I have had problem with this kind of thing and it really sounds like a working directory issue to me.

eric_darling
09-24-2004, 09:42 AM
Hey Brett, you mean in AMS, right?

Brett
09-24-2004, 10:38 AM
Yeah I guess so. All of your "Setup Factory" this and "AMS" that got me all backasswards. :lol

eric_darling
09-24-2004, 12:03 PM
You know, I had that thought too, Brett, right after I originally posted a couple of days ago. So, I set the working directory, but I still experience the same issue, so it's not that.

I did eventually find a workaround for the whole mess, though... Take out the option to start immediately after install complete. The client never missed it, particularly because I added a screen with options to run the read me text file and another PDF, which both work just fine, BTW.

So, it'll remain a mystery since that's the first and last build I'll ever do in 6. I have already converted the project to 7, and from now on, that's where yours truly will stay. :yes