#75111 - 2003-05-21 05:06 PM
Need Help with this Script
|
cmack0
Fresh Scripter
Registered: 2003-05-21
Posts: 5
|
I followed a Sample script that was posted on another site, and now this script does not work right... Some users aren't getting their S drives, some aren't mapping the alternate group mappings...and others work fine if I browse to the Netlogon share and run it manually. Workstations are a mix of 9x, w2k and xp, AD domain. There doesn't seem to be any pattern to this either.
;**** Created with KiXscripts Editor | http://KiXscripts.com **** ;**** Last Modified on 5/7/2003 at 3:45:40 PM by macalusoc ****
:Server_List ; Sets the Servers in use. $Server1 = "\\WMCFPS01\" $Server2 = "\\WMCFPS02\" $server3 = "\\ISMSD03\" $server4 = "\\COLD\" $server5 = "\\HOPE\" $server6 = "\\WMCAPP01\" $server7 = "\\Transplant_DC1\" $server8 = "\\WMCCHF01\"
CLS $section=1 ;Section 1 Color c+/n Box (9,29,15,46,single)
Color r+/n At (10,30) "Welcome to the," At (12,32) @domain At (12,37) "Domain" At (14,30) @fullname Sleep 1
Small Color b+/n Box (0,0,24,79,GRID) ; 'background grid' Color b/n Box (8,21,18,61,Å) ; 'shadow' of the box Color g+/n Box (7,20,17,60,FULL)
SetTime $Server3
Color w+/n At ( 9,25) "Userid : " ; display some text strings At (10,25) "Full name : " At (11,25) "Privilege : " At (12,25) "Workstation : " At (13,25) "Domain : " At (14,25) "Logon Server : " At (15,25) "Current Time : " At (16,25) "Today's Date : "
Color y+/n At ( 9,40) @userid ; ...and some macro's At (10,40) @fullname At (11,40) @priv At (12,40) @wksta At (13,40) @domain At (14,40) @lserver At (15,40) @time At (16,40) @DATE Sleep 1.5
:set_vars $section=$section+1 ; Section 2 Use "*" /delete $h="\\wmcfps02\@userid" ;$s="\\wmcfps01\@PRIMARYGROUP"
CLS At (12,30) "Mapping Drives" Use b: /delete ;Use h: /delete ;Use s: /delete Use h: $h+"$" ;Use s: $s
:Departmental_Drive_Mappings $section=$section+1 ; Section 4 If InGroup ("AccountsPayable") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "AP" EndIf
If InGroup ("Admitting") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Admitting" EndIf
If InGroup ("AidsCare") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "AidsCare" EndIf
If InGroup ("AmbCare") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "AmbCare" EndIf
If InGroup ("AmbSurgery") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "AmbSurgery" EndIf
If InGroup ("Anesthesiology") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Anesthesiology" EndIf
If InGroup ("BHCGroup") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "BHC" EndIf
If InGroup ("Budget") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Budget" EndIf
If InGroup ("BurnCenter") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Burn" EndIf
If InGroup ("CHFGroup") CLS At (13,30) "Mapping Departmental Drives" Use s: $server8 + "RE Letters" EndIf
;If InGroup ("ChildLife") ; CLS ; At (13,30) "Mapping Departmental Drives" ; Use s: $server1 + "ChildLife" ; ;EndIf
;If InGroup ("ChildHosp") ; CLS ; At (13,30) "Mapping Departmental Drives" ; Use s: $server1 + "ChildHosp" ; ;EndIf
If InGroup ("Clinical Labs") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Labs" EndIf
If InGroup ("CPEP") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "BHC" EndIf
If InGroup ("CTS") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "CTS" EndIf
If InGroup ("Dentistry") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Dentistry" EndIf
If InGroup ("EmergencyRoom") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "ER" EndIf
If InGroup ("Eng") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Eng" EndIf
If InGroup ("Finance") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Finance" EndIf
If InGroup ("Food Svcs") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "FoodServices" EndIf
If InGroup ("GeneralAccounting") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "GenAcct" EndIf
If InGroup ("HeartCenter") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Heart" EndIf
If InGroup ("Human Resouces") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "HR" EndIf
If InGroup ("Infect Control") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Infection" EndIf
If InGroup ("Infosys") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Infosys" EndIf
If InGroup ("FireSafety") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "FireSafety" EndIf
If InGroup ("Law") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Law" EndIf
If InGroup ("Marketing") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Marketing" EndIf
If InGroup ("MaterialsMgt") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "MaterialsMgt" EndIf
If InGroup ("Matrix") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Matrix" EndIf
If InGroup ("Medical Records") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "MedRec" EndIf
If InGroup ("MFHA") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "MFHA" EndIf
If InGroup ("NeonatalGroup") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Neonatal" EndIf
If InGroup ("Neurophysiology") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Neurophys" EndIf
If InGroup ("Neuroscience") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "NeuroSurg" EndIf
If InGroup ("Nursing") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Nursing" EndIf
If InGroup ("OCCHealth") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "OCCHealth" EndIf
If InGroup ("Optho") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Optho" EndIf
If InGroup ("Orthopedics") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Orthopedics" EndIf
If InGroup ("PatientAccounts") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "PA" EndIf
If InGroup ("Pastoral Care") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Pastoral" EndIf
If InGroup ("PatRel") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "PatRel" EndIf
If InGroup ("PharmacyGroup") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Pharmacy" EndIf
If InGroup ("Planning") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Planning" EndIf
If InGroup ("ReEngineering") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "ReEngineering" EndIf
If InGroup ("Respiratory") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Respiratory" EndIf
If InGroup ("Quality Mngt") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Quality" EndIf
If InGroup ("RegulatoryAffairs") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "RegAff" EndIf
If InGroup ("RehabilitationGroup") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Rehabilitation" EndIf
If InGroup ("RiskManagement") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Risk" EndIf
If InGroup ("Security") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Security" EndIf
If InGroup ("Stat Flight") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Statflight" EndIf
If InGroup ("TCC") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "TCC" EndIf
If InGroup ("Telecomm") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Telecomm" EndIf
If InGroup ("Training") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Training" EndIf
If InGroup ("Transplant") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Transplant" EndIf
If InGroup ("Volunteer Svcs") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "Volunteer" EndIf
If InGroup ("WIHD") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "WIHD" EndIf
If InGroup ("WMCAdmin") CLS At (13,30) "Mapping Departmental Drives" Use s: $server1 + "WMCAdmin" EndIf
:Alternate_Mappings $section=$section+1 ; Section 5 If InGroup ("AltFireSafety") CLS At (13,30) "Mapping Additional Drives" Use t: $server1 + "FireSafety" EndIf
If InGroup ("AltBHC") CLS At (13,30) "Mapping Additional Drives" Use t: $server1 + "BHC" EndIf
If InGroup ("CHFGroup") CLS At (13,30) "Mapping Additional Drives" Use g: $server1 + "REDatabase" EndIf
If InGroup ("Citrix - Clickview") CLS At (13,30) "Mapping Additional Drives" Use c: $server1 + "clickview" EndIf
If InGroup ("Citrix - Clickview") CLS At (13,30) "Mapping Additional Drives" Use f: $server1 + "clickview" EndIf
If InGroup ("Citrix - Clickview") CLS At (13,30) "Mapping Additional Drives" Use r: $server1 + "f" EndIf
If InGroup ("Code808") CLS At (13,30) "Mapping Additional Drives" Use t: $server1 + "Code808" EndIf
If InGroup ("CTS") CLS At (13,30) "Mapping Additional Drives" Use n: $server1 + "CTS" EndIf
If InGroup ("CTS") CLS At (13,30) "Mapping Additional Drives" Use r: $server1 + "CTS_Shar" EndIf
If InGroup ("Food Svcs") CLS At (13,30) "Mapping Additional Drives" Use p: $server1 + "FTP_FoodServ" EndIf
If InGroup ("FTP_QCFTP") CLS At (13,30) "Mapping Additional Drives" Use u: $server2 + "FTP_QCFTP$" EndIf
If InGroup ("Infect Control") CLS At (13,30) "Mapping Additional Drives" Use r: $server4 + "IsolationRpt" EndIf
If InGroup ("Law") CLS At (13,30) "Mapping Additional Drives" Use f: $server1 + "Appslaw" EndIf
If InGroup ("Medical Records") CLS At (13,30) "Mapping Additional Drives" Use k: $server5 + "Apps" /persistant EndIf
If InGroup ("Medical Records") CLS At (13,30) "Mapping Additional Drives" Use L: $server5 + "Apps" /persistant EndIf
If InGroup ("Medical Records") CLS At (13,30) "Mapping Additional Drives" Use m: $server1 + "3MHIS" EndIf
If InGroup ("MFHA") CLS At (13,30) "Mapping Additional Drives" Use f: $server1 + "AppsMFHA" EndIf
If InGroup ("NeonatalGroup") CLS At (13,30) "Mapping Additional Drives" Use k: $server1 + "DE40" EndIf
If InGroup ("NeonatalGroup") CLS At (13,30) "Mapping Additional Drives" Use m: $server1 + "Logbook" EndIf
If InGroup ("NeonatalGroup") CLS At (13,30) "Mapping Additional Drives" Use n: $server1 + "Progress" EndIf
If InGroup ("NeonatalGroup") CLS At (13,30) "Mapping Additional Drives" Use o: $server1 + "Neonatal" EndIf
If InGroup ("NeonatalGroup") CLS At (13,30) "Mapping Additional Drives" Use r: $server1 + "Neonatal" EndIf
If InGroup ("Nursing") CLS At (13,30) "Mapping Additional Drives" Use f: $server1 + "AppsNursing" EndIf
If InGroup ("Nursing") CLS At (13,30) "Mapping Additional Drives" Use g: $server1 + "Grasp" EndIf
If InGroup ("Nursing") CLS At (13,30) "Mapping Additional Drives" Use l: $server1 + "Grasp2" EndIf
If InGroup ("Nursing") CLS At (13,30) "Mapping Additional Drives" Use q: $server6 + "cachesys" EndIf
If InGroup ("OCC-HR") CLS At (13,30) "Mapping Additional Drives" Use o: $server1 + "Shared with HR" EndIf
If InGroup ("ResearchGrants") CLS At (13,30) "Mapping Additional Drives" Use u: $server1 + "Researchgrants" EndIf
If InGroup ("RegulatoryAffairs") CLS At (13,30) "Mapping Additional Drives" Use f: $server1 + "AppsRegAff" EndIf
If InGroup ("Reliant") CLS At (13,30) "Mapping Additional Drives" Use r: $server1 + "Reliant" EndIf
If InGroup ("RiskManagement") CLS At (13,30) "Mapping Additional Drives" Use g: $server1 + "AppsRegAff" EndIf
If InGroup ("SilentType") CLS At (13,30) "Mapping Additional Drives" Use t: $server1 + "SilentType" EndIf
If InGroup ("SMSLIB") CLS At (13,30) "Mapping Additional Drives" Use g: $server1 + "SMSLIB" EndIf
If InGroup ("Trac") CLS At (13,30) "Mapping Additional Drives" Use t: $server1 + "Trac" EndIf
If InGroup ("Transplant") CLS At (13,30) "Mapping Additional Drives" Use g: $server7 + "Apps" EndIf
If InGroup ("WorkerInjuries") CLS At (13,30) "Mapping Additional Drives" Use o: $server1 + "Worker-Injuries" EndIf
;:Printers ;$section=$section+1 ; Section 6 ;If InGroup ("Infosys") ; CLS ; At (11,30) "Adding Printers" ; AddPrinterConnection ("\\WMCFPS01\IS_Rm_101") ; AddPrinterConnection ("\\WMCFPS01\InfoSys01") ; AddPrinterConnection ("\\WMCFPS01\InfoSys03") ; AddPrinterConnection ("\\WMCFPS01\InfoSys04") ; If SetDefaultPrinter ("\\WMCFPS01\IS_Rm_101")=0 ; At (13,30) "Default Printer IS_Rm_101" ; EndIf ;EndIf
:Desktop_Management $section=$section+1 ; Section 7 At (10,24) "Checking SMS Components" If Exist("%SYSTEMROOT%\MS\SMS\LOGS\CLICORE.LOG")=0 Shell @LDRIVE + "\SMSLS.BAT" EndIf
;CLS ;If @PRODUCTTYPE = "Windows 95" ;Color y+/b "OS is Windows 95 " ;Else ;If @PRODUCTTYPE = "Windows 98" ;Color r+/g "OS is Windows 98..." ;Else ;If @PRODUCTTYPE = "Windows 2000 Server" ;Color m+/n "OS is Windows 2000 Server!!!"
;Sleep 5
;:Securing_Station ;$section=$section+1 ; Section 8 ;CLS ;At (10,24) "Checking Screen saver. Please Wait" ;$act=ReadValue("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaveActive") ;$sec=ReadValue("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaverIsSecure") ;If $act=1 AND $sec=1 ; GoTo Dontwrite ;Else ; GoTo Write ;EndIf ;
;:Write ;$section=$section+1 ; Section 9
;WriteValue("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaveActive","1","REG_SZ") ;WriteValue("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaverIsSecure","1","REG_SZ") ;WriteValue("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaveTimeOut","900","REG_SZ") ;WriteValue("HKEY_CURRENT_USER\Control Panel\Desktop","SCRNSAVE.EXE","c:\winnt\system32\SSPIPES.SCR","REG_SZ") ;WriteValue("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DPipes","JointType","2","REG_SZ") ;If @ERROR = 0 CLS ; At (10,24) "Screen Saver updated" ;Else ; ;EndIf ;GoTo IE_Start_Page
;:Dontwrite ;$section=$section+1 ; Section 10 ;CLS ;At (10,24) "Screen Saver Already Set" ;Sleep 1
:IE_Start_Page $section=$section+1 ; Section 11 $home=ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main","Start Page") If $home<>"icare" GoTo Set_Home_Page Else GoTo end EndIf
:Set_Home_Page $section=$section+1 ; Section 12 If InGroup ("Domain Admins") GoTo END Else WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main","Start Page","icare","REG_SZ") EndIf
:END Exit
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
1 registered
(Allen)
and 1198 anonymous users online.
|
|
|