Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving Windows LoginID 1

Status
Not open for further replies.

llaber

MIS
Feb 3, 2010
4
US
I need to know if there is a way to get the Windows Login ID, in a perl program? I will just be storing their ID in the log, so we know who is running the program.
 
Could you please give me more detail. I am new to Windows and Perl. I'm used to Unix.
 
Code:
 $username= $ENV{USERNAME};
 chomp $username;

dmazzini
GSM/UMTS System and Telecomm Consultant

 
i don't think you need to chomp it do you?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
You're right travs69,it's not needed.

dmazzini
GSM/UMTS System and Telecomm Consultant

 
Can this work for a script ran from a Linux box via a web interface on a windows machine.

Just want to make sure the it's clear to OP and future readers when / where this will work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top