Does anybody know how I can get the Windows Username of my visitors? And could you please post your script in a running HTML.file? I know it can be done with ASP, unfortunately, that's no option...
It can only be done from the server... HTML definetely cannot do it.
Well, it posted this similar message on the Java-board, and it dropped to page three within one day...
What are your options? Which languages can you use on your server?
Your server may not have support for ASP, but VBScript will work.
To my knowledge, it cannot be done with PHP. ASP may be the only option.
If users have to log in using Windows Authentication to view pages, and you set the event logging on your server appropriately, you'll be able to find the info in the server's logs.
I'm trrying very hard to prevent a logging in. It is a system on which users can report incidents involving the IT-infrastructure etc. so making a login screen is an extra step for the users. These users will be a little disgruntled to begin with, because their computer isn't acting the way they want it to.
So logging on really is but a last resort...
i had the same problem with creating intranet pages. i needed user accounts. but why force users to type their usernames and passwords if i can get it from windows?
well, the solution is not nice, but at least it is working.
i created simple logon script, which contains this line:
echo %USERNAME% > \\server\intranet$\userdata\%COMPUTERNAME%.txt
and from php script i can access the very right file a read the username.
this solutions is only useable when users use their own accounts.
Nice patch hehehe !
There must be a way to catch the windows username, but this is a nice workarround.
I try some ways and put here the results.
Originally Posted by georgoz
I realized that I cant access the file by the name of the client computer. So I had to do a few changes. Now I access the file using IP adrress. The biggest problem was to extract the ip address from windows command line. There is my code:
It creates a filename named by IP address with username, computer name, date and time inside. Now I am able to access it using REMOTE_ADDR. It is working on Win2k and WinXP. I am not sure about WinNT.
for /f "delims=[ tokens=2" %%X in ('ping %computername% -n 1 -w 1 ^| find "PING"') do (
for /f "delims=] tokens=1" %%C in ("%%X") do echo %username% %computername% %date% %time% > %%C
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)