It is not a permissions problem. Since IE hangs while trying to access the CGI file, it is clear that the system call to notepad.exe is indeed working. If you check the list of programs running under the 'Processes' tab of the Windows Task Manager while accessing the CGI, I'm confident you will see notepad.exe listed. Since notepad does not exit until the user exits it intentionally, the 'hanging' you are experiencing is notepad waiting for the user to exit notepad.

External programs you execute while within a CGI script are run hidden -- you will not see the graphical interface for the program; in this case, the notepad window. I'm wondering whether you are expecting the notepad window to appear on the server computer that is running the CGI process, or if you're wanting notepad to run on the client's computer.

If you are looking to have the notepad program run on the server side, then the best method I can think of is to have the CGI script add a command to a database to execute (such as 'notepad.exe'), and then write a separate server-type script that will execute these commands outisde the CGI server process. If you're expecting notepad to run on the client's side, you'd have to have the client download the program first.


In reply to Re: Running a .exe file in perl/cgi in windows 2000 server by saskaqueer
in thread Running a .exe file in perl/cgi in windows 2000 server by hamibab

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.