Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

strAutoLogon

Status
Not open for further replies.

Webflex

Technical User
Apr 20, 2001
101
0
0
GB
I'm running a copy of Snitz forum. in a mixed mode (and migrating) NT/AD domain. The forums utilise auto logon which works for NT users with this

NT
Code:
Set strNTUserInfo = GetObject("WinNT://"+strNTUser)
strNTUserFullName=strNTUserInfo.FullName

and for AD users with this

AD
Code:
Set strNTUserInfo = GetObject("LDAP://GB001SV0001/DC=NS,DC=TPNET,DC=INTRA")
strNTUserFullName=strNTUserInfo.Name

The full code segment for one type is below, can anyone suggest a way to combine this so it works for users in both NT and AD?

Code:
	if strAutoLogon="1" then
		strNTUserFullName = Session(strCookieURL & "strNTUserFullName")
		if Session(strCookieURL & "strNTUserFullName") = "" then
			Set strNTUserInfo = GetObject("WinNT://"+strNTUser)
		& "strNTUserFullName") = strNTUserFullName
		end if
 
I would think that the Snitz Communuity forum would be the best place for an answer. If anyone has done the code there is the most likely place it will be.

However the chances of finding the answer will be slim as it is probably not a scenario that many Snitz users will be up against.

Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
Nightclub counting systems

So long, and thanks for all the fish.
 
Yeah tried snitz, nothing there, I'm thinking we'll just have to take the pain until we finish the migration.
 
I don't know anything of this Snitz but perhaps you could make a little VB ActiveX DLL that holds a COM object with an API call to get the current version of Windows.

Also, if this is the only place you need it, you could take a brute force approach:

On Error Resume Next
Set myOb = A
If Not myOb Is Nothing And Err.Number = 0 Then
'Insert code to use object A here
Else
Set myOb = B
'Insert code to use object B here
End If
On Error Goto 0
 
Thanks, only place so went for the brute force option, it seems to have done the trick.
 
Yes it seems to, the AD users who were reporting problems can now access and the existing NT ones too, many thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top