I did use the Create() method for Win32::Process to start Apache in the background. Be sure you're using the flags CREATE_NO_WINDOW and DETACHED_PROCESS (or'ed together, like so:
CREATE_NO_WINDOW|DETACHED_PROCESS
so that the whole call looks similar to:
my $apache_obj;
Win32::Process::Create(
$apache_obj,
"\\ws\\server\\Apache\\Apache.exe",
"apache -f $apache_dir\\httpd.conf",
0,
CREATE_NO_WINDOW|DETACHED_PROCESS,
"."
) || die "Starting webserver: $!\n";
There are some other things to think about like how you get the working directory set up, where your Apache config will be, whether it all stays on the CD or if you use a temporary directory, and a few more issues. Using the proper flags should get your process detached and windowless, though. See the Win32::Process documentation for even more flags. You might want to cross-check those against some Microsoft docs, too, but I don't recall exactly where those docs are. | [reply] [d/l] [select] |