Is there a problem here with the fact that the program I am trying to launch has a GUI? I have tried using 'cmd.exe', and cmd.exe hangs, cant kill it.

This is the expected behaviour I'm afraid, when you start a GUI program from a CGI program it is not going to appear on your desktop so you have no way of interacting with it, it is started at the behest of another user in effect and in general one wouldn't want another users programs appearing on your desktop. I can't test this right now but if you are running NT or 2000 then you might be able to alter the configuration of the Apache service so that it has the 'Interact with Desktop' attribute set and change it so it runs under your user but this is almost certainly a very bad thing in security terms ...

As for cmd.exe you *can* get the output from that to the browser if you do something like:

print `cmd.exe /c dir`;
But again I can't test that right now.

/J\


In reply to Re: system() hangs by gellyfish
in thread system() hangs by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.