I'm working on a little fun school project.
I want to create a windows form application, which runs commands in cmd by opening batch-file. I do not have much experience in using batch-files.
I need help with the following:
Otherwise good guides for working and learning batch-files are much appreciated.
I'll give you some hints:
/k
switch i.e. cmd /k ipconfig
EDIT:
Make this the contents of your batch file:
@echo off
ipconfig
Then call the batch file like this (from command line/run etc):
cmd /k iptest.bat
Or from Winform (C#):
Process p = new Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.Arguments = "/k iptest.bat"
p.Start();