Ok, I have been trying for some time now to get a separate script to run independently from the main "index.pl" script. After several attempts, the closest I have found (system, exec, ipc::run, etc. etc.) was the Win32::Process:Create() function. I have looked a "alot" of tutorials and examples and ended up with this:

use Win32::Process(); Win32::Process::Create( $Child_Module, "$ENV{SystemRoot}\\notepad.exe", "notepad testfile.txt", 0, Win32::Process::CREATE_NEW_CONSOLE(), "." );
And when I "execute" the script on Win32 Apache, I can see where the "task" starts up (via task manager on http server), but it doesn't show up on the (http servers) desktop. The task manager says it's running under "SYSTEM". I'm assuming it's not showing up on the desktop is because I'm signed in as 'username' not 'SYSTEM'. How to I get the Win32::Process::Create() to start up on the 'username' account rather than the 'SYSTEM' account so I can continue with my development?


I tried re-inventing the wheel again, but everytime I push it, it still falls flat on it's side...

In reply to Win32 Process Create by PriNet

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.