Can you really install Apache having a script/batch file?

Sure is...

 apt-get install apache2

right within the old batch file, based on your package manager.

Should you desired to install from source, just

wget linktoapachesource.com

and set all of the steps you'd normally take in the party script.