500 Points  web page computername capture

Posted on 2009-04-21
Last Modified: 2013-11-18
Hi, I'm trying to create a script that will capture a users computername username or other system info when the user logs in.  Users that log in are staff members with editing access to our website.  We would like to keep track of who is logging in, and if a users credentials are compromised, we'll have the IP address (already being tracked), computername and username of the culprit.  It should autmatically capture this on page load.

Anyway, i'm trying to accomplish this with a simple javascript or activeX.  i've come up with something like this which doesnt return any values.

Also, it would probably work better as a post to a database than an email submission since IE gives a warning when sending an email from the page.  It is currently sending the email, but only after several warnings... so that's not really gonna work.  I dont mind them accepting the active X install.

why am i not getting any values back and how can i post this to a db or text file or something other than an email.

<script language="javascript">

function getcredential() {

    var wshnetwork=new ActiveXObject("");

    //write to some (hidden) form field 

    with (document.formname) {













Please consent to the execution of a "unsafe" ActiveX.<br />


<form name="formname" action="" method="post">

<input type="hidden" name="usernamefieldname"   />

<input type="hidden" name="computernamefieldname" />

<input type="hidden" name="userdomainfieldname"  />

<INPUT TYPE="submit" VALUE='send'>



Open in new window

Question by:rgvit
    LVL 30

    Accepted Solution

    LVL 1

    Author Comment

    Ive seen some references to using which is what i'm using in the code i posted.  The problem is that I dont seem to be getting any values back when i do that.  I also want to store those values or even email them, provided that the email function doesnt go through the whole "Are you SURE you want to send an email... ARE YOU VERY SURE...  ARE YOU ABSOLUTELY POSITIVE... ALLOW!"
    warnings that come up when you try to use the form submit to email.

    in fact that script was supposed to work without <INPUT TYPE="submit" VALUE='send'>
    which i added while tinkering with it.

    Thanks... can someone provide me with the code i need ?

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Suggested Solutions

    Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
    I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
    The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now