PDA

Click to See Complete Forum and Search --> : calling a not-VB program


Deju
Jan 17th, 2000, 07:36 PM
How can I call another exe-file which is not programmed in VB. It is a accountancy-program.

Normaly I have to copy an ini-file from the server to my own pc. Then I call my program mggen.exe. These things happens now in a bat-file, but i would like to do is with VB.

Tanks for helping me.

Deju

ivyl
Jan 17th, 2000, 07:55 PM
You can use the shell command to call another program like this (this starts notepad):

Shell "c:\windows\notepad.exe", vbNormalFocus

To copy a file you can use the FileCopy functions:

copyfrom$ = "c:\test.txt"
copyto$ = "c:\windows\test.txt"
FileCopy copyfrom$, copyto$

Deju
Jan 17th, 2000, 09:55 PM
Thanks for helping me out.

Is it also possible to give some parameters from the dos-prompt to my application?

Thanks

Fox
Jan 17th, 2000, 10:10 PM
You can use 'Command' to get the arguments, not sure if it works from DOS too...

-
Dim Temp as String

Temp = Command
MsgBox "Arguments: " & Temp
-

------------------
fox_mccloud@gmx.net
...
Every program can be reduced to one instruction which doesn't work.