I created a task with the task scheduler in windows 10 to open cmd.exe. it ran successfully like this
But I need to run some commands every time it opens something like this
and automatically runs this command.
this is important that it opens a command prompt first and then runs the command inside the command prompt automatically.
Use /k
flag. See cmd.exe /k switch.
If you don't need console window to stay after commands completed use /c
flag. You can read more about them with cmd /?