in reply to Windows Logon ID capture

Hi,

Win32::LoginName()
"Returns the username of the owner of the current Perl process."
From Perl in a Nutshell (ISBN 1565922867) - 19.17 Win32 Extensions.

Hope this helps,

Cheers

Martin

Replies are listed 'Best First'.
Re^2: Windows Logon ID capture
by kaif (Friar) on Jun 14, 2005 at 13:52 UTC
      TANSTAAFL Its only "free" for 14 days. Then its $19.95 /month and up. I don't begrudge them their business though.

      I have seen various bootleg copies mounted to the internet before. Be aware that is copyright infringement and the O'Reilly police will get you.

        Aha! My apologies to everyone to whom I said that it was available for free. It seems that I have access to the material because my provider (MIT) subscribes or something. Thanks.

Re^2: Windows Logon ID capture
by dtharby (Acolyte) on Jun 14, 2005 at 15:04 UTC
    Thanks Martin
    I attempted to assign the value of Win32::Login() to a scalar ($script_runner) but I get the following error

    Can't locate auto/Win32/Login.al in @INC

    I have checked and it is indeed right

    I am using ActiveState Perl 5.8 build 811


    UPDATE: have used ppm to check for module but have had not luck finding the Win32 one....
      Hi,

      Have you had a look here.
      Hope this helps.

      Cheers,

      Martin
      You will also need to put "use Win32;" in your script before you call the function. I don't think you'll need to PPM it, I believe its one of the core modules.
        Yeah.. already got that at the top.
        Thats whats confusing me !!
      The function is Win32::LoginName

      my $script_runner = Win32::LoginName; # ^^^^
        Yes thanks bmann, what a silly mistake...

        Thanks to all that replied....