I have an Active State Perl v5.6.1 script running on Windows NT Server that works just fine when I double click on it, however, it has a specific error when it is called via a schedule using Windows NT's AT command.
The error is "System Error 1312. A specific logon session does not exist. It may have already been terminated"

The Perl that is causing the problem is...
system ("NET USER /ADD $theStudent $thePassword");

Normally the NET command can be called in Perl, but it seems that calling the command in Perl via the AT command somehow does not give the same level of system access.

I tried calling the command thus...
system("CMD /C NET USER /ADD $theStudent $thePassword");
but it was the same.

If you have Windows NT / 2000 specific information on why this is occuring, I'd like to hear from you.

david.bakkers@centralcollege.edu.au

In reply to System Error 1312 when using calling Perl via WinNT's AT command 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.