LilProgrammerGirl
Programmer
Hi all,
Essentially, I am trying to run a .vbs script on the server that will pass the user's nt login name to my asp page and display it on the screen. Right now, I use the include tag and it is literally just printing the code on my screen.
Here is the contents of my .vbs file:
The contents of my asp page:
Does anyone have a clue as to what I am doing wrong?
Thanks much!
Hailey
Essentially, I am trying to run a .vbs script on the server that will pass the user's nt login name to my asp page and display it on the screen. Right now, I use the include tag and it is literally just printing the code on my screen.
Here is the contents of my .vbs file:
Code:
Function ShowInfo
DIM strComputer
Set objNetwork = CreateObject("WScript.Network")
strComputer = objNetwork.ComputerName
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colComputer = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystem")
For Each objComputer in colComputer
wscript.echo "User Name: " & objComputer.UserName
Next
End Function
The contents of my asp page:
Code:
<% Response.Buffer = True %>
<html>
<head>
<title>Call Center Work Order Accuracy</title>
</head>
<BODY>
<!--#include file="showinfo.vbs" -->
<%
Response.Write showinfo()
%>
</body>
</html>
Does anyone have a clue as to what I am doing wrong?
Thanks much!
Hailey