how to programmaticaly restart WAMP or Apache?

You can use this command for restart Wamp, Apache, Mysql services
For Start Services
NET START wampapache
NET START wampmysqld
For Stop Services
NET STOP wampapache
NET STOP wampmysqld

Nikunj K

Phasellus facilisis convallis metus, ut imperdiet augue auctor nec. Duis at velit id augue lobortis porta. Sed varius, enim accumsan aliquam tincidunt, tortor urna vulputate quam, eget finibus urna est in augue.