Results 1 to 4 of 4

Thread: calling a not-VB program

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    belgium
    Posts
    74

    Post

    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

  2. #2
    Junior Member
    Join Date
    Jan 2000
    Posts
    21

    Post

    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$

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    belgium
    Posts
    74

    Post

    Thanks for helping me out.

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

    Thanks

  4. #4
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Post

    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
    -

    ------------------
    [email protected]
    ...
    Every program can be reduced to one instruction which doesn't work.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width