Access network credentials using javascript

Is there anyway to access network credentials with javascript without having to manually set them? This is needed in order to pass the credentials dynamically to a webservice. The webservice is setup for windows authentication and the browser is IE8.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michel PlungjanIT ExpertCommented:
Try the code mentioned here.
<script language=javascript>   
  function getNTUsername(){
var wshNetwork = new ActiveXObject("WScript.Network");   
        alert('domain ='+   wshNetwork.UserDomain);   
        alert('machine name = '+   wshNetwork.ComputerName);   
        alert('user name = '+   wshNetwork.UserName);
        document.getElementById('username').value = wshNetwork.UserName;
        document.getElementById('UsernameDiv').innerHTML = 

Open in new window

However your HTML has to be saved with extension .hta and has to be loaded from hard disk
mplungjan, just for curiosity: how would a local stored .hta file be loaded/used by a page send from anywhere without violating the SOP?
(sorry for the silly question, as I'm no IE and M$ guru ;-)
Michel PlungjanIT ExpertCommented:
You will need to "save/open" it from the web or copy it to your intranet users if that is what you need.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

hmm, let's see if the author ask for an intranet solution which requires IE policies set to ignore any security ...
Michel PlungjanIT ExpertCommented:
If not, then the answer is: not possible

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
EntAppDevTeamAuthor Commented:
This won't work.  At best, the user will be prompted to allow on every page load. Check it out
question answered, isn't it?
hmm, mplungjan helped answering too, IMHO ...
Michel PlungjanIT ExpertCommented:
I believe I did.

What you are trying to do is a security risk, hence it only works on the lowest security level - that is when the user started the HTA him/herself

this cannot be done from a web page from a web server
@all: I fully agree with mplungjan's comments and helped to point out the limits
sorry for beining a bit short in my comments, but mplungjan got them all:)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.