Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi everyone!!

I'm working on an intranet website where the name of the person connected is display. Like, if John Doe connect to his session, i want to recover is windows username, so, when his open the portal, John Doe is display with all information without a login page.

I try the ActiveX object
JavaScript
var wshell = new ActiveXObject("WScript.Shell"); 
var username = wshell.ExpandEnvironmentStrings("%USERNAME%");


My problem is that is my portal is for a lot of people in intern and i'm not authorized to use activeX for security.

There are any possibility to go get Windows Username without using an ActiveXObject? Without to put a login page.

If possible, i need something that i don't need to 'activate' something on the computer (like authorized activeX on each IE since a have more then 200 computers will use the portal).

I look up since 3 days for that without finding something working to change it.

My portal work on PHP and Javascript.

What I have tried:

Looking in PHP and Javascript stuff without success!!
Posted
Updated 7-Dec-16 11:14am

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900