Welcome message

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Try posting to microsoft.public.scripting.wsh or
microsoft.public.scripting.vbscript

Gary said:
Could i get some help with this VB welcome message, i am using Win2k
server and 2000 pro XP descktops
 
You should probably ask this is a scripting group, like
microsoft.public.windows.server.scripting.

You may also want to mention what - specifically - you want help with.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top