@echo off :: last edit: 6/21/2006 :: Cleaned up some things since script doesn't run visible - jtdennis :: itdlogon.cmd :: Logon script for the ITD Division at The University of Memphis :: :: Purpose: To map drives and perform some basic administrative functions :: on user login. :adminstrative :: Check to verify that the LSP group is in the local Administrators group. :: Add LSP group If not present. Net localgroup Administrators | Find /i "UOM\lsp-css" > nul If not %errorlevel%==0 ( Net localgroup Administrators "UOM\lsp-css" /add > nul ) ) ::does an update of Group Policy gpupdate /force /wait:0>nul NetSh firewall Set service RemoteAdmin enable >nul :: for WMI results to be sent to MMC Consoles NetSh firewall add allowedprogram program=%windir%\system32\wbem\unsecapp.exe name=UNSECAPP>nul ::One of the three LiveUpdate entries will work depending on the version of LiveUpdate NetSh firewall add allowedprogram program="C:\Program Files\Symantec\LiveUpdate\Lucomserver.exe" name=Liveupdate>nul NetSh firewall add allowedprogram program="C:\Program Files\Symantec\LiveUpdate\Lucomserver_2_5.exe" name=Liveupdate2.5>nul NetSh firewall add allowedprogram program="C:\Program Files\Symantec\LiveUpdate\Lucomserver_2_6.exe" name=Liveupdate2.6>nul ::for remote management of Symantec Antivirus NetSh firewall add allowedprogram program="C:\Program Files\Symantec AntiVirus\Rtvscan.exe" name=SymantecAntivirus >nul :drivemaps :default ::Default Home Mapping for all ITD Users If Exist \\ghostrider\home$\%username% Goto home :home Net use h: \\ghostrider\home$\%username% /persistent:no >nul :csspublic \\ghostrider\scripts$\ifmember "UOM\CSS-Users" >nul If not errorlevel 1 Goto cssprivate Net use p: \\ghostrider\home$\csspublic /persistent:no >nul :cssprivate \\ghostrider\scripts$\ifmember "UOM\CSS-Private" >nul If not errorlevel 1 Goto VPCIO Net use r: \\ghostrider\home$\cssprivate /persistent:no>nul :VPCIO \\ghostrider\scripts$\ifmember "UOM\VPCIO-Users">nul If not errorlevel 1 Goto AVP Net use o: \\ghostrider\home$\vpoffice /persistent:no>nul Net use v: \\ghostrider\home$\vpgroup /persistent:no>nul :AVP \\ghostrider\scripts$\ifmember "UOM\VPCIO avp">nul If not errorlevel 1 Goto Matcord Net use q: \\ghostrider\home$\AVP /persistent:no>nul :Matcord \\ghostrider\scripts$\ifmember "UOM\CSS Matcord">nul If not errorlevel 1 Goto budget Net use x: \\ghostrider\home$\matcord /persistent:no>nul :budget \\ghostrider\scripts$\ifmember -v "UOM\ITD budgetteam">nul If not errorlevel 1 Goto lsp-css Net use s: \\ghostrider\home$\budget /persistent:no>nul :lsp-css \\ghostrider\scripts$\ifmember -v "UOM\lsp-css">nul If not errorlevel 1 Goto adminsys :adminsys \\ghostrider\scripts$\ifmember "UOM\AdminSys-Users">nul If not errorlevel 1 Goto ad136 Net use t: \\itfs\ISAdminSys /persistent:no>nul ::dataadmin :: \\ghostrider\scripts$\ifmember "UOM\DataAdmin-Users">nul :: if not errorlevel 1 Goto webservices :: echo Connecting to dataadmin directory (Z:) :: Net use z: \\itfs\ /persistent:no>nul ::webservices :: \\ghostrider\scripts$\ifmember "UOM\Web Services-Users">nul :: If not errorlevel 1 Goto end :: echo Connecting to webservices directory (Y:) :: Net use y: \\itfs /persistent:no>nul :en