I want to have a batch file which run a executable file(Test.exe). when test.exe is called it would open a command prompt environment.On this stage i want that some defined command(s) automatically be written on that prompt environment and then it hit enter automatically so that my command(s) run
|
The standard way to run multiple command at once is to separate each command with Other options include setting the path, turning echo on or off, etc. Run So, your batch file would probably look something like this:
|
|||||
|
|
For the sake of curiosity, why do you want to the commands to appear and run? Nevertheless, the test.exe should be created using a programming language which supports opening applications and sending key strokes to it. Is there any programming language you are familiar with? That is if you want the test.exe to open the command prompt and do the job. This is the .NET way of doing it The more easy way is to call upon another batch file or the same batch file can be used. The batch file would have |
|||||
|
|
So First, create a file called, say
|
|||
|
Have you tried PowerShell? Microsoft seems to be seeing the light around using a command-line and PowerShell seems to be their direction for the near future. |
|||
|
|