Link to home
Start Free TrialLog in
Avatar of olcay
olcay

asked on

How to present USER-Name (WinNT, WIN2000) in html-page

I should present the local USER (WinNT, WIN2000) in my html-page. How can I read system-environmentvariable in html-page?
Avatar of jayyu2k
jayyu2k

If you are trying to get the NT LOGIN of the user ..
I Guess u cant get that in the in STATIC HTML Pages. U need to have ASP page for that.

 <%Request.Servervariables("AUTH_NAME")%>

use this -=> And get the NT User login. But this Cant be helpful in every client.  There are Limitations. infact Many.
Avatar of olcay

ASKER

>jayyu2k

is it not possible with javaScript in html-page?
 
If you are trying to get the NT LOGIN of the user ..
I Guess u cant get that in the in STATIC HTML Pages. U need to have ASP page for that.

 <%Request.Servervariables("AUTH_NAME")%>

use this -=> And get the NT User login. But this Cant be helpful in every client.  There are Limitations. infact Many.
Sorry For REPOSTING>> >I REFRESHED THE PAGE AFTER A DURATION OF TIME>> AM REALLY SORRY
No. It's not possible with ANY client side scripting. And it hardly ever works with server side scripting either.

They're not YOUR users. They're coming in as the default internet user -- not an actual account. Unless they have to actually go through an NT logon, they're not your user.
Avatar of olcay

ASKER

>>jayyu2k

test.asp: (in C:\Inetpub\wwwroot\, WIN2000, IIS5.0)

<% @ Language=VBScript %>
<html>
<head>
</head>
<body>
<%Request.Servervariables("AUTH_NAME")%>
</body>
</html>

not presents the NT-Login ??
WHAT NT login? I'm not logging in. I'm coming from a web page.

That's why it's not reliable.
Avatar of olcay

ASKER

The Problem is:

after I have logged me on the WinNT,WIN2000 (I have to give my Login-Name and my password) I will start the IE with my html-page. Then I will se the Login-Name in the html-page.

Is it not possible to get the Login-Name from the %USER% environmentvariable?

Or can I save (via a batch-program) the Login-Name in a text-file and then read in the html-page?

ASKER CERTIFIED SOLUTION
Avatar of CJ_S
CJ_S
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can't write out files to the client either!
olcay,

is this for an intranet??
olcay -> When u are working on the Intranet u can Ofcourse Fetch the -> NT User Login.

BUT This will definately not work.. when it comes to the internet. U get the nt Login.. as long as the pages are in the inetpub/wwwroot/whatever... But once they are on the web. Ur Pages Cant fetch the Client NT Login. As U Wouldnt be Treating them.. as Users Logged in to Ur System. Its not POSSIBLE .

As Long as U are limited to Intranet -+ U Could Exercise.. But NEver Possible in the other form.
Avatar of olcay

ASKER

tanx all.

>>CS J

Thanx very much.

How can I assign the Login-name from the object to a label?

Is it possible to get the source-code from your loginid-ActiveX ?

Regards

It's not made by me, and if it were. Code won't be given for true applications I made :-)

I think you'll have to ask a new question to get that answered!

CJ