Opening an external application

W

wmdmurphy

I know that it is possible to open an external app from Access using the
shellexecute API, but it appears you can't include a parameter along with
the application name. I need to open the stunnel application and include
the name of a configuration file like:

c:\stunnel\stunnel SMTPatt.txt

Also, is there code available that can be used to programmatically close a
running application later once you are done with it?

Bill
 
D

Daniel Pineault

If you can call the program and pass input parameters through dos then you
can do so in vba

Shell "C:\Path\FileName.exe parameter1 parameter2 ...",vbnormalfocus

If you Google or search this forum you can find numerous post on the Shell
command with tons of examples to learn further from.
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.com/index.php
Please rate this post using the vote buttons if it was helpful.
 
W

wmdmurphy

Dave sent me this link to an api that will close a running app and it works
well. I need to close the stunnel.exe program but the api requires a class
name. Apparently stunnel does not have a visible class name. Do you know a
way to determine this or is there a work around?

Bill
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
W

wmdmurphy

Doug,

I should have mentioned that I did run the api you mention below after
starting stunnel.exe, and stunnel did not appear on the list.

Bill
 
D

Douglas J. Steele

And you were able to identify everything that did show up on the list?

I wouldn't expect that "stunnel" would necessarily show up in the list, if
that was your expectation. For instance, this is the entry corresponding to
the instance of Access that was open:

Class = OMain Caption = Test97.mdb
 
W

wmdmurphy

Yes, I could identify the ones that did show up, and nothing resembled
stunnel. I tried another approach just to see if I could kill the stunnel
process, and could not do so using:

taskkill /pid 2096

where 2096 was the process ID for stunnel. Also tried:

taskkill /IM stunnel.exe

and that did not kill the task.

The built in taskkill XP command does work for other apps.

Bill
 

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

Top