hi there,
i am working with this script on my project.

Function AuthCheck(ByVal sUser As String, ByVal sPassword As String) As Boolean
On Error GoTo E

Dim RootDSE
Dim DSObject
Dim Auth
Dim NamingContext
Const ADS_SECURE_AUTHENTICATION = 1

Set RootDSE = GetObject("GC://DOMAIN/rootDSE")
NamingContext = RootDSE.Get("defaultNamingContext")

Set DSObject = GetObject("GC:")

Set Auth = DSObject.OpenDSObject("GC://" & NamingContext, sUser, sPassword, ADS_SECURE_AUTHENTICATION)

Set Auth = Nothing
Set DSObject = Nothing
Set RootDSE = Nothing

AuthCheck = True
Exit Function
E:
AuthCheck = False
' log the err.Description if needed
End Function

I want to use Domain Name by getting it through winntsysteminfo on runtime. this script works fine if domain name is hard-coded. Please Help.