Anyone have sample code to show the current windows username?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone have sample code to show the current windows username? I didn't
want to run this on the server. Javascript is OK, but I need it in HTML page
and .HTM file, so it can't be server-side or ASP.

I just want a page that has a title and "You're logged in as: XXXX\YYYY".

Any ideas?
 
I got it to work with a default record having "suser_sname()" in a field that
I could use
 
I got it to work with a default record having "suser_sname()" in a field
that
I could use
--
Okay, smart guy. Now, go to your neighbor's house, log onto your web site
anonymously and see what the user name is. Unless you require a Windows
login, your users all log in to your Internet web site under the anonymous
Internet User account.
"Everyone knows something you don't know"

A 2-year-old knows nothing that I don't know. Learn from the experience of
those who have gone before you before you try to go beyond them. And when
you do try to go beyond, be careful that you don't slip. There are no
guardrails there.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
I need all the friends I can get! ;-)

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
1st of all a 2 year old knows how to behave, unlike you... mostly kidding.

Actually because I have OWC hooked into the website it does pull in the
username.
 
Actually because I have OWC hooked into the website it does pull in the
username.

....which will be anonymous unless you require a Windows login to access your
site, or are viewing the site located on your own computer, while logged
into your own computer.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
1st of all a 2 year old knows how to behave, unlike you... mostly kidding.

Do you have children? They don't call it "the terrible twos" for nothing!

--

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
One more thing, which may be helpful (I hope). If the OWC is on the client
machine, that is, an ActiveX control in a web page that is on the client
machine, you will get the logged-in user name of the user on that machine,
on the page on that user's machine. So, you will get things like
"Administrator," "Guest," and "Mary." If that's what you want, that will
work. So, for example, if your goal is to display the user's login name TO
the user, your plan will succeed.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
Back
Top