1 It is possible, but unusual, for command windows not to close. Is is possible that your chosen commands have prevented the batch file from completing?
- Perhaps you have used Start commands and they are holding it up because you? That's unnecessary. All you needed to do was use the same command that is in the shortcut you normally use to run the application.
- There are many ways to run an application from a batch file.
- Do this test. Add an additional last line to the batch file to see if it is reached
Code:
:: test that this is the one specified
Dir \\SomeComputerThatIsOnTheOneSpecified\SomePathOnIt\SomeFileOnIt.txt
If %ErrorLevel% EQU 0 GoTo OneSpecifiedIsHere
GoTo ItIsntHere
Pause This line is never reached
:OneSpecifiedIsHere
::Do whatever I want to if the one specified is detected
GoTo EndThisBatch
:ItIsntHere
::Do whatever I want to if the one specified is not detected
:EndThisBatch
Pause at the last line of the batch file
When you have run that test, let me know the result. You can also post your batch file and I'll have a look at those application commands.
2 My preferred method of making batch files run inconspicuously is given in
Make Task scheduler run a batch file minimised and with a specific icon - TenForums
3 When the batch file is set up to run minimised and everything is working alright, you can experiment with different ways of
minimising the application windows
- Not all applications will respond to any such attempts
- I would not expect to be able to start the application in one window state then alter that state later.
- I suggest that it would be better to focus on starting the applications with minimised windows in the first place.
- We can discuss this as soon as the current batch file performs adequately.
- I imagine that I will suggest a solution that is along the same lines as the vbs file shown in the para 2 link but it might be the case that Start commands can achieve the desired result more directly.
Denis