arst06d
Programmer
- Nov 29, 2002
- 324
Hi
when I run the following:
I get the following output:
It runs fine as a vbs svript on my pc, but fails in an asp on the webserver. The webserver is an old recycled NT desktop.
I'd appreciate your thoughts.
when I run the following:
Code:
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<%
function getUserGroups(sUser)
dim objGroup
dim objUser
sDomain = "SHBMAIN"
Response.Write sUser & " - " & sDomain & "<br><br>"
set objUser = GetObject("WinNT://" & sDomain & "/" & sUser ,"user")
for each oGroup in objUser.Groups
sGroups = sGroups & oGroup.Name & "<br>"
Next
response.write sGroups
end function
%>
</HEAD>
<BODY >
<% call getUserGroups("daar01")%>
</BODY>
</HTML>
I get the following output:
Code:
daar01 - SHBMAIN
Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object: 'GetObject'
/david/snapshots/getusergroups.asp, line 15
It runs fine as a vbs svript on my pc, but fails in an asp on the webserver. The webserver is an old recycled NT desktop.
I'd appreciate your thoughts.