Hello everyone, I'm a making a BAT file creator and I can't find a way to add a 'Test' feature (open without saving)
This is the code I tried using:

    Shell("command.Text")

*Doesn't shell start DOS?
command.text=that's where users wrtie a code

Can someone give me a working code on how to make dos run commands for a bat file without opening it?
llike writing and runing a command and something like that :-/

Edited 3 Years Ago by DyO1

Yes, command is what the text box name's is!
Tried that code and it says File Not Found, same with the double quotes.

Here's a WORKING code:

       System.IO.Directory.CreateDirectory("C:\BATman Temp\")
        Dim writer As New IO.StreamWriter("C:\BATman Temp\testfile.bat")
        writer.Write(command.Text) 
        writer.Close() 
        System.Diagnostics.Process.Start("C:\BATman Temp\testfile.bat")

'C:\BATman Temp\ is the temp directory
'testfile.bat is the temp file name
'after saving it executes with System.Diagnostics.Process.Start
This question has already been answered. Start a new discussion instead.