Script de logon
Description du code
Code source ou contenu du fichier
Code Winbatch (Script de logon) (191 lignes)
;******************************************************************** ;* Name of File : LOGON.SCR (for Nothing Hill) ;* Date of Creation : ;* Author : ;* ;* last update : ;********************************************************************* ;================================ ;DECLARATION OF CERTAIN VARIABLES ;================================ $ssname = "worldsave!.scr" $UpdateFile = "20021025-004-" + "i32.exe" ;====================================== ;SETTING DOS SCREENS IN FULLSCREEN MODE ;====================================== WriteValue("HKEY_USERS\.DEFAULT\Console","Fullscreen","1","REG_DWORD") WriteValue("HKEY_CURRENT_USER\Console","Fullscreen","1","REG_DWORD") ;================ ;CLEAR THE SCREEN ;================ cls ;====================== ;SHOWING WELCOME SCREEN ;====================== COLOR w+/b BOX(0,0,25,79,double) COLOR y+/b AT (1,52) small "@DAY @MDAYNO @MONTH @YEAR" AT (1,3) small "Hello @USERID," COLOR w+/b BOX(2,2,4,77,single) AT (3,15) small "Welcome on the LAN of BELUROKOS Nothing Hill" COLOR w+/b SLEEP 2 ;---------------------------------------- ;--------------------------------- ;Synchronizing with Server Clock ;--------------------------------- AT (6,5) "1. Synchronizing with Server Clock ..." ;AT (6,5) "" SHELL 'ECHO forbidden|su administrator CMD /C net time \\G20220S0003 /set /y >nul' sleep 1 ;------------------------------------------------------- ; CHECK IF SCREENSAVER EXISTS ON LOCAL DRIVE ; IF NOT COPY THE SCREENSAVER FROM SERVER TO LOCAL DRIVE ;------------------------------------------------------- AT (7,5) "2. Configuring ScreenSaver" AT (8,5) "" $result = exist("c:\WINNT\system32\sstext3d.scr") if $result=0 SHELL 'CMD /C xcopy "\\G20220S0003\netlogon\sstext3d.scr" "c:\WINNT\system32\" >nul' endif ;--------------------------------------------- ; WRITE SCREENSAVER SETTINGS TO LOCAL REGISTRY ;--------------------------------------------- ;$Result = EXISTKEY("HKEY_CURRENT_USER\Control Panel\Screen Saver.3Dtext") ; - CREATING KEY CONCERNING THE 3DText SCREENSAVER IF existkey( "HKEY_CURRENT_USER\Control Panel\Screen Saver.3Dtext" ) <> "0" $result = addkey( "HKEY_CURRENT_USER\Control Panel\Screen Saver.3Dtext" ) ELSE $result = 0 ENDIF ; - WRITING VALUES IN REGISTRY CONCERNING THE 3DText SCREENSAVER - IF $Result = 0 WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","DemoType","0",REG_SZ) WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","RotStyle","2",REG_SZ) WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","Tesselation","50",REG_SZ) WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","Size","72",REG_SZ) WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","Speed","0",REG_SZ) WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","SurfStyle","0",REG_SZ) WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","Font","Times New Roman",REG_SZ) WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","FontAttributes","1",REG_SZ) WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","Charset","0",REG_SZ) WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","Mode","1",REG_SZ) WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","Text","BELUROKOS X",REG_SZ) WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","Texture","C:\WINNT\WinNT.BMP",REG_SZ) ENDIF ; - WRITING VALUES IN REGISTRY CONCERNING ACTIVATION OF THE SCREENSAVER - WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaveActive","1",REG_SZ) IF @USERID = "BELUROKOS-COMCEN" WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaverIsSecure","0",REG_SZ) ELSE WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaverIsSecure","1",REG_SZ) ENDIF WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaveTimeOut","900",REG_SZ) WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Desktop","SCRNSAVE.EXE","C:\WINNT\SYSTEM32\sstext3d.scr",REG_SZ) sleep 1 ;---------------------------------------- ; UPDATE Norton AntiVirus IF NECESSARY ! ;---------------------------------------- ;**** Norton Antivirus definitions update ;$UpdateFile = "0321" + "i32.exe" AT (8,5) "3. Checking your Norton AntiVirus Definition Files ..." $result = exist("c:\program files\navnt\updates\$updatefile") if $result=0 COLOR R+/b AT (9,5) " Updating your Norton AntiVirus ..." Shell 'CMD /C del "c:\program files\navnt\updates\?????????????i32.exe" /Q >nul' SHELL 'CMD /C xcopy "\\G20220S0003\netlogon\$updatefile" "c:\program files\navnt\updates\" >nul' Shell 'CMD /C "c:\program files\navnt\updates\$Updatefile" /Q' AT (10,5) " Update Terminated !" COLOR w/b else AT (10,5) " Definition Files need No Update !" endif SLEEP 1 ;* End Update Norton AntiVirus * ;******************************* ;********************************** ;------------------------- ; MAPPING TO SERVER SHARES ;------------------------- ; AT (11,5) "4. Connecting to your Network Directories ..." AT (12,5) "" ; ;MAPPING TO BELUROKOS COMMON FOLDERS ;----------------------------------- USE I: /DEL USE X: /DEL USE Y: /DEL USE F: /DEL USE G: /DEL USE P: /DEL USE H: /DEL USE H: "\\G20220S0004\@USERID" USE Z: "\\G20220S0003\BELUROKOS-NH-COMMON" ; ;SLEEP 5 ; MAPPING TO GROUPS COMMON FOLDER ;-------------------------------- IF INGROUP("Group-CieB") USE X: "\\G20220S0003\CieB-Common" ENDIF IF INGROUP("Group-CieC") USE X: "\\G20220S0003\CieC-Common" ENDIF IF INGROUP("Group-CieA") USE X: "\\G20220S0003\CieA-Common" ENDIF IF INGROUP("Group-CieM") USE X: "\\G20220S0003\CieM-Common" ENDIF IF INGROUP("Group-CieL") USE X: "\\G20220S0003\CieL-Common" ENDIF AT (12,5) "5. Connecting to your Network Printer ..." AT (13,5) "" ;**************************************************** ;---------------------------- ; MAPPING TO NETWORK PRINTER ;---------------------------- ;$Result = AddPrinterConnection("\\G20220S0004\Minolta_NH_") ;--------------------------------------- ; SET NETWORK PRINTER IN SRT AS DEFAULT ;--------------------------------------- ;IF INGROUP("Group-LocalPrt-Users") ; $state = "IN" ;ELSE ; $state = "OUT" ;ENDIF ;IF $state = "OUT" ;$Result = SetDefaultPrinter("\\G20220S0004\Minolta_NH") ;ENDIF $Result = DELPRINTERCONNECTION("\\G20220S0004\Minolta_NH") $Result = DELPRINTERCONNECTION("\\G20220S0004\Minolta_Log") ;------------------------------------------ ; SET DEFAULT PRINTER FOR GROUP OPS AND LOG ;------------------------------------------ IF INGROUP("Group-LocalPrt-CieABM") ;$Result = AddPrinterConnection("\\@DOMAINS0004\Minolta_NH") $Result = AddPrinterConnection("\\G20220S0004\Minolta_NH") ;$Result = SetDefaultPrinter("\\G20220S0004\Minolta_NH") ENDIF IF INGROUP("Group-LocalPrt-Log") $Result = AddPrinterConnection("\\G20220S0004\Minolta_Log") ;$Result = SetDefaultPrinter("\\G20220S0004\Minolta_Log") ENDIF ;******************************************** AT (13,5) "6. Profiling your Outlook ..." CALL OL98PRF.SCR ;**************************** ; E N D O F F I L E .SCR ;****************************
Autres extraits de codes en Winbatch
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 05/10/2009, zuletzt geändert 28/10/2018
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/sniplet-rf-misc/Logon.scr.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.