Click to See Complete Forum and Search --> : How to capture user name/id from PC


anil0kd0
July 30th, 2002, 09:28 AM
Let's say I am a user and have logged to the network. How do I capture user name from the pc using vbScipt (Asp environment).

I am creating a form for people to submit their request of change in clinics. I need to capture their username from their PC as a precaution and also from breaching against the company law.

Thank you .... and please help.

goddess_spanky
July 30th, 2002, 10:56 AM
Assuming you are using IIS 5.0,

1. Turn on "Integrated Windows Authentication" in the IIS Options (if it is not already on)

2. In your ASP Script, use

UserName = Request.ServerVariables("REMOTE_USER")

If your Windows accounts are setup with domains (e.g. windowsgroup1\cguru), you will need to parse the return value to exclude the domain name.

That should be it. If you have a different setup or have problems, let me know and I will see what I can do to help!