Code: Select all
@echo off
start /b "C:\Program Files (x86)\some_program\microapache\mapache.exe" -f "C:/Users/user/AppData/some_program/microApache/httpd_conf.txt"
exit /b
:: Error
The system cannot find the file -f.
Alternatively, I can start from a batch a Windows shortcut with target: "C:\Program Files (x86)\some_program\microapache\mapache.exe" -f "C:/Users/user/AppData/some_program/microApache/httpd_conf.txt", and in this case the argument is processed correctly:
Code: Select all
@echo off
start "" "C:\Program Files (x86)\some_program\microapache\mapache"
exit /b
But starting the (run minimized) shortcut results in microApache window left open or minimized, when it should ideally remain closed, while the server is running. Is there a way to resolve such issue using a batch? It looks like leaving microApache window closed requires using %comspec%, like shown here.