Hello,
I would like to know how I can add good morning and afternoon, to my logon script.
It works now, but I would like to add the code in the comment section to the body of this logon script, but not have any more msgboxs popup, except the 1.
So that when the user logs on, he or she will get good morning or afternoon, with this code
& "Your User Name is: " & WshNetwork.UserName & VbCrLf _
***************************************************************************************
Dim WshNetwork
Dim WshShell
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Popup "Welcome to " & WshNetwork.UserDomain & "Domain" & vbCrLf _
& VbCrLf _
& "Your User Name is: " & WshNetwork.UserName & VbCrLf _
& VbCrLf _
& "You are a member of: " & (strGroups) & VbCrLf _
& VbCrLf _
& VbCrLf _
& "All Network Drives Mapped!" & VbCrLf _
& VbCrLf _
& VbCrLf _
& Space (16)& "Today's Date is: " & (FormatDateTime(Now(),vbLongDate))& VbCrLf _
& Space (16)& "Your Local System Time is: " & Time
'Comment Section
FormatDateTime(now,1)
If InStr(now,"AM") Then
MsgBox "Good Morning"
Else
MsgBox "Good Afternoon"
End If
Thanks,
Mike
I would like to know how I can add good morning and afternoon, to my logon script.
It works now, but I would like to add the code in the comment section to the body of this logon script, but not have any more msgboxs popup, except the 1.
So that when the user logs on, he or she will get good morning or afternoon, with this code
& "Your User Name is: " & WshNetwork.UserName & VbCrLf _
***************************************************************************************
Dim WshNetwork
Dim WshShell
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Popup "Welcome to " & WshNetwork.UserDomain & "Domain" & vbCrLf _
& VbCrLf _
& "Your User Name is: " & WshNetwork.UserName & VbCrLf _
& VbCrLf _
& "You are a member of: " & (strGroups) & VbCrLf _
& VbCrLf _
& VbCrLf _
& "All Network Drives Mapped!" & VbCrLf _
& VbCrLf _
& VbCrLf _
& Space (16)& "Today's Date is: " & (FormatDateTime(Now(),vbLongDate))& VbCrLf _
& Space (16)& "Your Local System Time is: " & Time
'Comment Section
FormatDateTime(now,1)
If InStr(now,"AM") Then
MsgBox "Good Morning"
Else
MsgBox "Good Afternoon"
End If
Thanks,
Mike