runApp adding directory path

K

Ken Ivins

I previously posted the below problem and no one responded (which I assume
means that they could not come up with an answer). So I did some more
experimentation on my own and came up some additional data. Maybe with this
information, someone can come up with an idea.

RunApp opens a number of other programs fine (both Microsoft and non
Microsoft). RunApp would not open a program from a shortcut though. So I
created a batch file (EMISbat.bat) that opened the C++ program (EMIS.exe)
that I placed in the same directory with EMIS.exe (the c:\aaa directory) It
opened it fine from Windows Explorer. The batch was quite simple:

c:\aaa\EMIS.exe

I then tried running the batch from RunApp. For the command line I entered
c:\aaa\EMISbat.bat and it would not work. I added a pause to the batch file
to see what was happening and noticed that something was added to my
command. The following command showed in the DOS window: C:\Documents and
Settings\Ken Ivins\My Documents\Customers>C:\AAA\EMIS.exe

I then changed the batch to:

cd C:\

cd C:\aaa

C:\AAA\EMIS.exe

Then it all worked fine. Any idea why Access/Windows is adding the other
directory information? Is there a way to stop this?

Thanks,
Ken Ivins



I am trying to run a simple C++ program that merges 3 ".asc" files into one
".asc" file from a RunApp Action in a Macro. I tried running it as a Windows
program and a dos program and still it did not work. I am using Access 2002
in a Win XP Pro environment.

The program runs fine by just double-clicking it. The Macro seems to start
the program. In the Dos mode a Dos window opens and then closes, but no new
file is created.

Any ideas why this is not working correctly?

Thanks,
Ken Ivins
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

RunApp question 2
Outlook Backup issues 0
Adding a word to a numerical field 0
RunApp 1
Prompt For Replace in Selection And More... 0
problem with RunApp 0
RunApp not running C++ .exe program 0
Variable RunApp 4

Top