I finally found the answer and this works now. In the Windows Services applet, double-click the Apache service and go to the Log On tab, and check the box for 'allow service to interact with desktop'. Restart the service and this works perfect now.
This can lead to security issues, but depending on your application, it can be very helpful.
Sorry for wasting time and space here, but you might as well leave this post, since a few others have had this problem and were never given a solution.