Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Activating an open external program

Status
Not open for further replies.

RichCraig

Programmer
Feb 13, 2003
54
GB
Hey

I've opened an exe using

Shell ("C:\MyPath\MyServer.EXE")

The problem I have is that it has a 'Start in server mode' button. Now I think I should be able to use something like

Shell ("C:\MyPath\MyServer.EXE RUN")

or something similar, but I've searched the net and can't find an example. Could anyone help as Im trying to automate a start up.

thanks in advance
 
I would use

Shell "C:\MyPath\MyServer.EXE RUN", vbNormalFocus

(the VBnormalfocus will have it maximised).

If you need to receive this in the other application (i dont know if you do) use command$ variable, which will store this!

HTH

Dan


----------------------------------------
There are 2 types of computer, the prototype and the obsolete!!
----------------------------------------
No D, just plank - and its not my fault
 
Is MyServer your own exe? If it is, then you should be able to pass anything along with the shell as command line arguments. Command returns the command line arguments as in "MsgBox Command".
-Max
 
Dan, Max

Thanks for the reply. Its not my software so I don't know what to pass to it. Obviously the
Shell "C:\MyPath\MyServer.EXE"
opens the pop up, the focus is on a text box displaying the status. To start the prog I have to tab once to change the focus to the 'Start in Server Mode' button then enter.

Im trying to find how to open&run the program in the background. Any ideas?
 
If found a different exe to start the app, but I'll look into the command line arguments.
thanks
 
how about the VBnormalfocus - you should be able to put other things such as vbminimisedfocus etc. Have a look and see if any help.

Dan

----------------------------------------
There are 2 types of computer, the prototype and the obsolete!!
----------------------------------------
No D, just plank - and its not my fault
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top