Thanks
QUOTE
Option Explicit
Dim oUser, oDepartment
setDepartment
createSplash
Sub setDepartment()
adsPath = "WinNT://" & DOMAIN_NAME & "/" & sUserName
Set oUser = GetObject(adsPath)
For Each Prop In oUser.Groups
Select Case UCase(Prop.Name)
Case "GROUP ONE"
oDepartment = "The First Group"
setDepartment = oDepartment
Case "GROUP TWO"
oDepartment = "The Second Group"
setDepartment = oDepartment
Case Else
oDepartment = "Company Name"
End Select
Next
End Sub
Sub createSplash(sCompName)
On Error Resume Next
Set oIE = CreateObject("InternetExplorer.Application")
With oIE
.navigate "logframe.htm"
' .left = (Screen.Width - 410) / 2
' .top = (Screen.Height - 420) / 3
.resizable=0
.height=460
.width=425
.menubar=0
.toolbar=0
.statusBar=0
.visible=1
End With
Do While oIE.Busy
Wscript.Sleep 100
Loop
oIE.document.all.wname.InnerText = sFullName
oIE.document.all.wcomp.InnerText = wshNetwork.ComputerName
oIE.document.all.wdept.InnerText = oDepartment
End Sub
Dim oUser, oDepartment
setDepartment
createSplash
Sub setDepartment()
adsPath = "WinNT://" & DOMAIN_NAME & "/" & sUserName
Set oUser = GetObject(adsPath)
For Each Prop In oUser.Groups
Select Case UCase(Prop.Name)
Case "GROUP ONE"
oDepartment = "The First Group"
setDepartment = oDepartment
Case "GROUP TWO"
oDepartment = "The Second Group"
setDepartment = oDepartment
Case Else
oDepartment = "Company Name"
End Select
Next
End Sub
Sub createSplash(sCompName)
On Error Resume Next
Set oIE = CreateObject("InternetExplorer.Application")
With oIE
.navigate "logframe.htm"
' .left = (Screen.Width - 410) / 2
' .top = (Screen.Height - 420) / 3
.resizable=0
.height=460
.width=425
.menubar=0
.toolbar=0
.statusBar=0
.visible=1
End With
Do While oIE.Busy
Wscript.Sleep 100
Loop
oIE.document.all.wname.InnerText = sFullName
oIE.document.all.wcomp.InnerText = wshNetwork.ComputerName
oIE.document.all.wdept.InnerText = oDepartment
End Sub