I am working with an old intranet site written in classic ASP. I try to get their username with which they entered their car. Each user registers with AD, but I cannot get it from the server, since the intranet site does not use AD.
I was told that I can use ActiveX to get it. I did some research and found the following code (javascript):
var wshshell = new ActiveXObject("WScript.shell");
var username = wshshell.ExpandEnvironmentalStrings("%username%");
I am currently using IE8 and I am getting the error "Automation server error does not create object" in this first line.
1) Any ideas why I get the error?
2) Is there a better way to do this, subject to my limitations?
source
share