Hi
For some time now I have been looking for some client side script to
get the windows logon id.
My asp.net application is running across three domains, so windows
authentication is no use to me. In client / server applications it is
simple to retrive the windows user id of the client to save them typing
it in every time. I wanted to replicate this functionality in a web
application.
This script will only work on PC's running Windows and IE, but thats
all we are running, so that's fine. 'Initialize and script ActiveX
controls not marked as safe' needs to be enabled in IE for this to
work.
Hopefully someone will find this useful.
<script language = "vbscript">
Dim Shell
set shell = createobject("wscript.shell")
set env = shell.environment("process")
document.form1.strUserName.value = env("username")
</script>
Cheers
Jared