G
Guest
Could i get some help with this VB welcome message, i am using Win2k server and 2000 pro XP descktop
Set WSHNetwork = WScript.CreateObject("WScript.Network"
Set oFSO = CreateObject("Scripting.FileSystemObject"
Set WSHSysEnv = WshShell.Environment("PROCESS"
Dim EXCLUDE_COMP, dataEC, aryEC, counter, msgSCRIP
Dim COMPNAME, USERNAME, LOGONSERVE
'Get Computers where script will skip to welcome messag
'=========
EXCLUDE_COMP = "skip_pc.txt
dataEC = oFSO.OpenTextFile(EXCLUDE_COMP,1).ReadAl
aryEC = Split(dataEC,vbCrLf
msgSCRIPT = "All logon script functions" & Chr(10) &
"executed successfully!
COMPNAME = WshNetwork.ComputerNam
USERNAME = WshNetwork.UserNam
LOGONSERVER = WSHSysEnv("LOGONSERVER"
'=== Exit Script program (Welcome Message) ==
Sub EXITSCRIP
WScript.Echo "Hello " & USERNAME & "!" & Chr(10) &
"Your Logon Server is " & LOGONSERVER & "." & Chr(10) &
"Logon to " & COMPNAME & " is complete!" & Chr(10) &
msgSCRIP
WScript.Qui
End Su
'=== Exit script if Computer name matches exclude comp array ==
For counter = 0 To Ubound(aryEC
If aryEC(counter) = COMPNAME The
msgSCRIPT = "Note: Many logon script functions" & Chr(10) &
"were skipped to log on to this PC.
EXITSCRIP
End I
Next
Set WSHNetwork = WScript.CreateObject("WScript.Network"
Set oFSO = CreateObject("Scripting.FileSystemObject"
Set WSHSysEnv = WshShell.Environment("PROCESS"
Dim EXCLUDE_COMP, dataEC, aryEC, counter, msgSCRIP
Dim COMPNAME, USERNAME, LOGONSERVE
'Get Computers where script will skip to welcome messag
'=========
EXCLUDE_COMP = "skip_pc.txt
dataEC = oFSO.OpenTextFile(EXCLUDE_COMP,1).ReadAl
aryEC = Split(dataEC,vbCrLf
msgSCRIPT = "All logon script functions" & Chr(10) &
"executed successfully!
COMPNAME = WshNetwork.ComputerNam
USERNAME = WshNetwork.UserNam
LOGONSERVER = WSHSysEnv("LOGONSERVER"
'=== Exit Script program (Welcome Message) ==
Sub EXITSCRIP
WScript.Echo "Hello " & USERNAME & "!" & Chr(10) &
"Your Logon Server is " & LOGONSERVER & "." & Chr(10) &
"Logon to " & COMPNAME & " is complete!" & Chr(10) &
msgSCRIP
WScript.Qui
End Su
'=== Exit script if Computer name matches exclude comp array ==
For counter = 0 To Ubound(aryEC
If aryEC(counter) = COMPNAME The
msgSCRIPT = "Note: Many logon script functions" & Chr(10) &
"were skipped to log on to this PC.
EXITSCRIP
End I
Next