ExeFile
ExeFile Filename$, Parameters$
 
Parameters:

    Filename$ = The Filename of the program you wish to execute
    Parameters$ = A string of parameters you wish to pass this program
Returns: NONE
 

      ExeFile will execute a another windows program.



FACTS:


      * Before you use ExeFile, always check if the program actually exists.



Mini Tutorial:


      This example will attempt to locate and run NotePad.exe from your windows directory.


  
; Create a variable with the filename and path
; of the NOTEPAD.exe program
  File$=WindowsDir$()+"\NotePad.exe"
  
; Check if the File exists
  If FileExist(file$)=true
   ; If the note pad exists then run it
     Print "found and running notepad"
   ; Run the program with no parameters
   ; For example you could also pass NotepAdd a file to
   ; open
     ExeFile File$,""
  Else
   ; Display error message if NotePad couldn't be found
     Print "Couldn't find note pad on your system"
  EndIf
  
  
; Display the screen and wait for a key press
  Sync
  WaitKey
  


This example should output.

  
  Found And running notepad
  

 
Related Info: CurrentDir$ | CurrentDrive$ | FileExist | SystemDir$ | TempDir$ | WindowsDir$ :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com