I want to run a batch file in minimized mode by another batch or vbs script. What i tried is:
batch1.bat
@echo off
start /min batch2.bat
batch2.bat
@echo off
{my program}
del /f /q batch1.bat >nul
del /f /q batch2.bat >nul
When I try this everything works perfectly the second batch runs and does it's job but at the end a minimized command prompt window stays which says the windows can not fond the batch file
and a simple prompt to the path of the batch file as like command prompt shows.
If i use exit
command instead of this line del /f /q batch2.bat >nul
from the second batch only then it works as i wish but it is important for my program to delete batch2 after it runs.
My only target is to run batch2 in minimized mode.so is there any help?i also cannot use shortcut to batch here.