
December 16th, 2003, 04:34 PM
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 1
Time spent in forums: 1 m 40 sec
Reputation Power: 0
|
|
Pulling out hair I don't have
I have a fun problem:
Need to do an inventory of several hundered machines. Wrote a web page that asks for basic information, and then hidden I have 2 fields that obtain the operating system and the computer name using javascript and vbscript, respectively.
I am also responsible for setting up the server that will host this site, but I think I have that part taken care of.
THe problem I am having is that I can't get the VBScript to initialize the wscript.network variable. I keep getting an "ActiveX can't create object" error. So I thought that maybe ASP would be my answer. Only 1 problem: ASP is server side, so the Computer Name variable always comes up as the server's computer name. And then, when I do use ASP, emailing the form results becomes a huge problem because of the stupid CDO rehash thingie where Microsoft is phasing out cdonts.newmail. Blah blah. And emailing form results with the webbot is SO easy. I would like to keep it as just a simple html if at all possible, with some Javascript and vbscript embedded, but I don't know how. Please help. Here is what I have for the vbscript portion.
<script language=vbscript>
Set objNetwork = CreateObject("wscript.network")
document.form1.CompName.value = objNetwork.ComputerName
</script>
Thanks.
|