Create and then execute a DOS batch file from within your program. 4 lines of code, no API, works w
Create and then execute a DOS batch file from within your program. 4 lines of code, no API, works will all VB versions.
Rate Create and then execute a DOS batch file from within your program. 4 lines of code, no API, works w
(2(2 Vote))
'** Create then execute a batch file
'** Compatible with all Winblows versions of
'** Visual Basic.
'**
'** From: revega May 06, 2002
'------------------------------------------
'
' Put this inside a command button or menu
Open "c:\echo.bat" For Output As #1
Print #1, "echo I was created in Visual Basic." 'Replace with your text
Close #1
'Note: one Print statement per line in the batch file.
'If you need more lines just put another PRINT #1, "blah" under the other one.
'Do this as many times as you need.
x = Shell("c:\echo.bat", 1) 'Now execute the file
Create and then execute a DOS batch file from within your program. 4 lines of code, no API, works w Comments
No comments yet — be the first to post one!
Post a Comment