Vince Wingate
asked on
WinNT://localmachine/User script Hangs
We have a call to Getobject("winNT://localma chinename/ username") . This is (unfortunately) run from some legacy code in VB6, as part of a login script on a Windows network, but with Novell eDirectory LDAP servers. The Login is being processed by the Novell Login GINA. The program, and call to "winNT" works perfectly across an installed user base of several 1000 windows XP pc's, but on one site and on some PC's it hangs.
In addition it particularly hangs on cold boot but not warm boot of the PC's. In our script we are trying to retrieve the user's SID, once we have the object returned from the winNT call.
The network uses a mix of NETBIOS/WINS/TCPIP and DNS
Our current working theory is that the getobject call is timing out on a network name resolution, however surely the call to "winNT://localmachinename/ user" would check the local pc name first prior to doing a network name resolution
If we wait "5" minutes then the script does complete, however typically it would complete in a number of seconds not minutes.
Any suggestions regards solving this?
How can we stop the hang
In addition it particularly hangs on cold boot but not warm boot of the PC's. In our script we are trying to retrieve the user's SID, once we have the object returned from the winNT call.
The network uses a mix of NETBIOS/WINS/TCPIP and DNS
Our current working theory is that the getobject call is timing out on a network name resolution, however surely the call to "winNT://localmachinename/
If we wait "5" minutes then the script does complete, however typically it would complete in a number of seconds not minutes.
Any suggestions regards solving this?
How can we stop the hang
How are you deriving the localmachine name?
ASKER
good question - we are reading the environment variable "USERDOMAIN" - which as its Novell eDirectory and not Windows DC/AD's is the local machine name
Does it work if you hard code the computername in there - as a test?
ASKER
we have debug statements all thru the code producing a log, and although the name is actually held in a string variable - we know that the string variable is set correctly - so in the actual (vb6) code we have
dim sComp as string
dim sUser as string
dim o as object
sComp = environ("USERDOMAIN")
sUser = environ ("USERNAME")
o = GetObject("WinNT://" & sComp & "/" & sUser")
dim sComp as string
dim sUser as string
dim o as object
sComp = environ("USERDOMAIN")
sUser = environ ("USERNAME")
o = GetObject("WinNT://" & sComp & "/" & sUser")
Hmm - I would still advise, especially since you're reaching to the environment, to grab sComp = environ("Computername") instead....and/or trim the string value as well...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.