Forum Moderators: open
I am new to java.
I have to fetch current logged on user from windows in order to make a URL single sign on.
I found few code from below link
[webmasterworld.com...]
Code
<script type="text/javascript">
<!--
var WinNetwork = new ActiveXObject("WScript.Network");
alert(WinNetwork.UserName);
//-->
</script>
Problem is this code always asks user to Activate ActiveXObject.
Is there any way to stop pop message ?
Or
Any other code available in java/VB script to get current logged on user ?
Thanks,
Avinash
The only way to access Windows OS level stuff is through ActiveX and for security reasons that always requires user approval. If this isn't for an intranet application, that approach won't work for any other operating system.
If it is an intranet environment, there may be a way to grant permission to your site to use activex across all the machines, but it wouldn't be via javascript, it'd be via the system settings.