in reply to system() or exec() in CGI scripts
fork and exec, despite the heroic efforts of a number of people, don't really work on Win32 platforms. You're much better off using Perl's Win32 interface. Something like the following will get you on your way:
use Win32; use Win32::Process; my $ie; Win32::Process::Create( $ie, 'C:/Program Files/Internet Explorer/iexplore.exe', 'http://localhost/foo.html', 0, NORMAL_PRIORITY_CLASS, '.' ) or print Win32::GetLastError();
Needless to say, this won't run on Unix, but if you are careful you can encapsulate this, and do the Right Thing according to platform.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: system() or exec() in CGI scripts (use Win32)
by LupoX (Pilgrim) on Sep 09, 2003 at 12:12 UTC | |
|
Re: Re: system() or exec() in CGI scripts (use Win32)
by BrowserUk (Patriarch) on Sep 09, 2003 at 12:21 UTC |