Solved

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

Posted on 2002-04-17
14
195 Views
Last Modified: 2010-04-09
I should present the local USER (WinNT, WIN2000) in my html-page. How can I read system-environmentvariable in html-page?
0
Comment
Question by:olcay
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 3
  • +2
14 Comments
 
LVL 2

Expert Comment

by:jayyu2k
ID: 6947677
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.
0
 

Author Comment

by:olcay
ID: 6947695
>jayyu2k

is it not possible with javaScript in html-page?
 
0
 
LVL 2

Expert Comment

by:jayyu2k
ID: 6947710
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.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:jayyu2k
ID: 6947716
Sorry For REPOSTING>> >I REFRESHED THE PAGE AFTER A DURATION OF TIME>> AM REALLY SORRY
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6947805
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.
0
 

Author Comment

by:olcay
ID: 6947948
>>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 ??
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6948226
WHAT NT login? I'm not logging in. I'm coming from a web page.

That's why it's not reliable.
0
 

Author Comment

by:olcay
ID: 6948251
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?

0
 
LVL 22

Accepted Solution

by:
CJ_S earned 100 total points
ID: 6948381
Javascript cannot do it.

I uploaded an activex object that does exactly that. As a user you must allow the activex component though.
I uploaded it to:
http://www.casema.net/~cjfamily/loginid.cab

and you use with the following code:

<OBJECT ID="oLoginID"
CLASSID="CLSID:E7504828-3EBB-11D3-A99B-0000836953AF"
CODEBASE="LoginID.CAB#version=1,0,0,0">
</OBJECT>

<script language="vbscript">
     msgbox oLoginID.LoginID
</script>

regards,
CJ
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6948383
You can't write out files to the client either!
0
 
LVL 18

Expert Comment

by:bruno
ID: 6948765
olcay,

is this for an intranet??
0
 
LVL 2

Expert Comment

by:jayyu2k
ID: 6949450
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.
0
 

Author Comment

by:olcay
ID: 6951670
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

0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6951859
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
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Disable selected option from one select box when selected in another select box 26 66
..ignore the Question 1 21
Html date format 9 20
CSS for Popup in ASP.NET 4 18
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question