Logon scripts go into your domain controllers NETLOGON folder. check out kix32 scripts.
Sample Script:
use n: "\\nybdc\nysys"
use s: "\\ctpdc\sys"
IF INGROUP("Domain Admins"
ENDIF
IF INGROUP("DEVELOPMENT"
USE T: "\\CICWEBSERVER\TEST$$"
USE P: "\\CICWEBSERVER\PRODUCTION$$"
USE V: "\\CICSILVER\DEVELOPMENT"
USE w: "\\CICSILVER\
ENDIF
IF INGROUP("CORP"
use H: "\\CTPDC\corp$$"
ENDIF
IF INGROUP("TRADING"
use T: "\\CTPDC\TRADING$$"
ENDIF
IF INGROUP("UKUSERS"
use L: "\\CIC-UKDC1\UKSYS$$"
ENDIF
IF INGROUP("Antares"
use x: "\\CICANTARES\SSC"
ENDIF
IF INGROUP("BACKOFFICE"
use r: "\\CTPDC\bkoffice$$"
ENDIF
IF INGROUP("LEGAL"
use l: "\\CTPDC\LEGAL$$"
ENDIF
IF INGROUP("LEGALHUMANRESOURCES"
use l: "\\CTPDC\LEGAL$$"
use p: "\\HRSQL\ADP$$"
ENDIF
IF INGROUP("Marketing"
use M: "\\NYBDC\Marketing$$"
ENDIF
IF INGROUP ("SFMarketing"
use M: "\\NYBDC\SFMarketing$$"
ENDIF
IF INGROUP("HEDGWARE"
use f: "\\HWSVR\hedge$$"
use q: "\\HWSVR\hedge2$$"
ENDIF
IF INGROUP("TAX"
use t: "\\CTPDC\TAX$$"
ENDIF
IF INGROUP("Eze TC users"
use O: "\\ECAPP\EZE"
ENDIF
IF INGROUP("Administrators"
USE x: "\\cicantares\ssc"
use y: "\\BESSERVER\Kits"
ENDIF
Yes, but I'm curious of how that might be scripted? if you were to simply write "net send John Good Morning" and add it to a script, everyone in the domain would get johns good morning message. unless there could be "net send %user% Good Morning"?
Forget the net send.You are then making your server do more work than it needs to when every user is logging on in the morning. Plus you are then relying on the fact that the user has the Messenger service runningand if thye have been plagued with pop-ups it may not be.
You can use a simple VBScript to do it.
Set WSHNetwork = CreateObject("WScript.Network"
UserString = WSHNetwork.UserName
MsgBox "Hello " & UserString & " you have successfully logged on. Have a great day."
Set WSHNetwork = Nothing
Just pop the above text into a text file, give it a VBS extension and add it to your GPO under login scripts.
Here is a more detailed login script that I use. It will check group memberships, map drives and printers and can synchronize computers with the server time.
'==========================================================================
'
' NAME: LogonScript
'
' AUTHOR: Mark D. MacLachlan, The Spider's Parlor
' URL :
' DATE : 4/10/2003
'
' COMMENT: Enumerates current users' group memberships in given domain.
'
'==========================================================================
ON ERROR RESUME NEXT
Set WSHShell = CreateObject("WScript.Shell"
Set WSHNetwork = CreateObject("WScript.Network"
DomainString = "DomainName"
UserString = WSHNetwork.UserName
Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)
'Synchronizes the time with Server our NTP Server
'WSHShell.Run "NET TIME \\Server /set /y"
WSHNetwork.RemoveNetworkDrive "F:"
wscript.sleep 300
'Maps drives needed by all
WSHNetwork.MapNetworkDrive "U:", "\\server\users",True
WSHNetwork.MapNetworkDrive "X:", "\\server\executables",True
'Now check for group memberships and map appropriate drives
For Each GroupObj In UserObj.Groups
Select Case GroupObj.Name
'Check for group memberships and take needed action
Case "Admin"
WSHNetwork.MapNetworkDrive "w:", "\\Server\Admin Stuff",True
Case "WorkerB"
WSHNetwork.MapNetworkDrive "w:", "\\Server\Shared Documents",True
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.