Submitted by danthedane on Fri, 03/02/2007 - 00:00
Forums

How can I grab the userid that the user used when signing in to Windows?
I need the information for my IceBreak application.

Syd Nicholson

Fri, 03/02/2007 - 00:00

For security reasons this is not easy to do. Imagine if a web site you visit runs code in your browser that (unknown to you) gains access to your user ID and password and then uses this to compromise your system and/or network!

I suspect that you are trying to automatically log a user on to a web server, and therefore I assume that you require both the userid and the password.

I don't know how easy it is to get the windows password - this may proove to be quite difficult, although I suspect that if you search the internet you will find hacking tools (illegal??) that will do this.

It is easier to get the User ID. You will need to use ActiveX. You might find a suitable control on the internet, or, alternatively you could create your own control using Visual Basic. The User object in VB should have a Name property that you should be able to use via some VB script in the browser.

If you are using LDAP for single sign on - you might be able to obtain sufficient information from the LDAP server, again using VBScript and ActiveX.

Hope this helps
Syd