Click to See Complete Forum and Search --> : get a Windows Environment Variable


warrendf
03-04-2003, 03:23 AM
:confused:
Hi All,

I need to get hold of the "USERNAME" environment variable for the logged in user on the client machine. I am trying to use this to autolog them in. Does anyone out there have any ideas?

Thx,

Nicodemas
03-04-2003, 04:28 AM
You can't through Javascript.

You can, however, through ASP. Use the Request.ServerVariables("LOGON_USER").

warrendf
03-04-2003, 05:01 AM
Thanks Rob,

I'll give that a bash and see

Warren

rkimball2000
03-04-2003, 12:45 PM
I am using PHP to autolog people in through a windows network. I know this can be done in Apache too. Some sample code is as follows;

http://kimball-usa.com/case_vote_project/windows_authentication_code.txt

The desired outcome is as follows;

http://kimball-usa.com/case_vote_project/windows_authentication_code_output.php