Script de logon

Description du code

Code source ou contenu du fichier

  1. ;********************************************************************
  2. ;* Name of File : LOGON.SCR (for Nothing Hill)
  3. ;* Date of Creation :
  4. ;* Author :
  5. ;*
  6. ;* last update :
  7. ;*********************************************************************
  8. ;================================
  9. ;DECLARATION OF CERTAIN VARIABLES
  10. ;================================
  11. $ssname = "worldsave!.scr"
  12. $UpdateFile = "20021025-004-" + "i32.exe"
  13. ;======================================
  14. ;SETTING DOS SCREENS IN FULLSCREEN MODE
  15. ;======================================
  16. WriteValue("HKEY_USERS\.DEFAULT\Console","Fullscreen","1","REG_DWORD")
  17. WriteValue("HKEY_CURRENT_USER\Console","Fullscreen","1","REG_DWORD")
  18. ;================
  19. ;CLEAR THE SCREEN
  20. ;================
  21. cls
  22. ;======================
  23. ;SHOWING WELCOME SCREEN
  24. ;======================
  25. COLOR w+/b BOX(0,0,25,79,double)
  26. COLOR y+/b
  27. AT (1,52) small "@DAY @MDAYNO @MONTH @YEAR"
  28. AT (1,3) small "Hello @USERID,"
  29. COLOR w+/b BOX(2,2,4,77,single)
  30. AT (3,15) small "Welcome on the LAN of BELUROKOS Nothing Hill"
  31. COLOR w+/b
  32. SLEEP 2
  33. ;----------------------------------------
  34. ;---------------------------------
  35. ;Synchronizing with Server Clock
  36. ;---------------------------------
  37. AT (6,5) "1. Synchronizing with Server Clock ..."
  38. ;AT (6,5) ""
  39. SHELL 'ECHO forbidden|su administrator CMD /C net time \\G20220S0003 /set /y >nul'
  40. sleep 1
  41. ;-------------------------------------------------------
  42. ; CHECK IF SCREENSAVER EXISTS ON LOCAL DRIVE
  43. ; IF NOT COPY THE SCREENSAVER FROM SERVER TO LOCAL DRIVE
  44. ;-------------------------------------------------------
  45. AT (7,5) "2. Configuring ScreenSaver"
  46. AT (8,5) ""
  47. $result = exist("c:\WINNT\system32\sstext3d.scr")
  48. if $result=0
  49. SHELL 'CMD /C xcopy "\\G20220S0003\netlogon\sstext3d.scr" "c:\WINNT\system32\" >nul'
  50. endif
  51. ;---------------------------------------------
  52. ; WRITE SCREENSAVER SETTINGS TO LOCAL REGISTRY
  53. ;---------------------------------------------
  54. ;$Result = EXISTKEY("HKEY_CURRENT_USER\Control Panel\Screen Saver.3Dtext")
  55. ; - CREATING KEY CONCERNING THE 3DText SCREENSAVER
  56. IF existkey( "HKEY_CURRENT_USER\Control Panel\Screen Saver.3Dtext" ) <> "0"
  57. $result = addkey( "HKEY_CURRENT_USER\Control Panel\Screen Saver.3Dtext" )
  58. ELSE
  59. $result = 0
  60. ENDIF
  61.  
  62. ; - WRITING VALUES IN REGISTRY CONCERNING THE 3DText SCREENSAVER -
  63. IF $Result = 0
  64. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","DemoType","0",REG_SZ)
  65. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","RotStyle","2",REG_SZ)
  66. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","Tesselation","50",REG_SZ)
  67. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","Size","72",REG_SZ)
  68. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","Speed","0",REG_SZ)
  69. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","SurfStyle","0",REG_SZ)
  70. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","Font","Times New Roman",REG_SZ)
  71. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","FontAttributes","1",REG_SZ)
  72. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","Charset","0",REG_SZ)
  73. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","Mode","1",REG_SZ)
  74. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","Text","BELUROKOS X",REG_SZ)
  75. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Screen Saver.3DText","Texture","C:\WINNT\WinNT.BMP",REG_SZ)
  76. ENDIF
  77. ; - WRITING VALUES IN REGISTRY CONCERNING ACTIVATION OF THE SCREENSAVER -
  78. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaveActive","1",REG_SZ)
  79. IF @USERID = "BELUROKOS-COMCEN"
  80. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaverIsSecure","0",REG_SZ)
  81. ELSE
  82. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaverIsSecure","1",REG_SZ)
  83. ENDIF
  84. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaveTimeOut","900",REG_SZ)
  85. WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Desktop","SCRNSAVE.EXE","C:\WINNT\SYSTEM32\sstext3d.scr",REG_SZ)
  86. sleep 1
  87. ;----------------------------------------
  88. ; UPDATE Norton AntiVirus IF NECESSARY !
  89. ;----------------------------------------
  90. ;**** Norton Antivirus definitions update
  91. ;$UpdateFile = "0321" + "i32.exe"
  92. AT (8,5) "3. Checking your Norton AntiVirus Definition Files ..."
  93. $result = exist("c:\program files\navnt\updates\$updatefile")
  94. if $result=0
  95. COLOR R+/b
  96. AT (9,5) " Updating your Norton AntiVirus ..."
  97. Shell 'CMD /C del "c:\program files\navnt\updates\?????????????i32.exe" /Q >nul'
  98. SHELL 'CMD /C xcopy "\\G20220S0003\netlogon\$updatefile" "c:\program files\navnt\updates\" >nul'
  99. Shell 'CMD /C "c:\program files\navnt\updates\$Updatefile" /Q'
  100. AT (10,5) " Update Terminated !"
  101. COLOR w/b
  102. else
  103. AT (10,5) " Definition Files need No Update !"
  104. endif
  105. SLEEP 1
  106. ;* End Update Norton AntiVirus *
  107. ;*******************************
  108.  
  109. ;**********************************
  110. ;-------------------------
  111. ; MAPPING TO SERVER SHARES
  112. ;-------------------------
  113. ;
  114. AT (11,5) "4. Connecting to your Network Directories ..."
  115. AT (12,5) ""
  116. ;
  117. ;MAPPING TO BELUROKOS COMMON FOLDERS
  118. ;-----------------------------------
  119. USE I: /DEL
  120. USE X: /DEL
  121. USE Y: /DEL
  122. USE F: /DEL
  123. USE G: /DEL
  124. USE P: /DEL
  125. USE H: /DEL
  126. USE H: "\\G20220S0004\@USERID"
  127. USE Z: "\\G20220S0003\BELUROKOS-NH-COMMON"
  128. ;
  129. ;SLEEP 5
  130. ; MAPPING TO GROUPS COMMON FOLDER
  131. ;--------------------------------
  132. IF INGROUP("Group-CieB")
  133. USE X: "\\G20220S0003\CieB-Common"
  134. ENDIF
  135. IF INGROUP("Group-CieC")
  136. USE X: "\\G20220S0003\CieC-Common"
  137. ENDIF
  138. IF INGROUP("Group-CieA")
  139. USE X: "\\G20220S0003\CieA-Common"
  140. ENDIF
  141. IF INGROUP("Group-CieM")
  142. USE X: "\\G20220S0003\CieM-Common"
  143. ENDIF
  144.  
  145. IF INGROUP("Group-CieL")
  146. USE X: "\\G20220S0003\CieL-Common"
  147. ENDIF
  148.  
  149.  
  150.  
  151.  
  152. AT (12,5) "5. Connecting to your Network Printer ..."
  153. AT (13,5) ""
  154. ;****************************************************
  155. ;----------------------------
  156. ; MAPPING TO NETWORK PRINTER
  157. ;----------------------------
  158. ;$Result = AddPrinterConnection("\\G20220S0004\Minolta_NH_")
  159. ;---------------------------------------
  160. ; SET NETWORK PRINTER IN SRT AS DEFAULT
  161. ;---------------------------------------
  162. ;IF INGROUP("Group-LocalPrt-Users")
  163. ; $state = "IN"
  164. ;ELSE
  165. ; $state = "OUT"
  166. ;ENDIF
  167. ;IF $state = "OUT"
  168. ;$Result = SetDefaultPrinter("\\G20220S0004\Minolta_NH")
  169. ;ENDIF
  170.  
  171. $Result = DELPRINTERCONNECTION("\\G20220S0004\Minolta_NH")
  172. $Result = DELPRINTERCONNECTION("\\G20220S0004\Minolta_Log")
  173. ;------------------------------------------
  174. ; SET DEFAULT PRINTER FOR GROUP OPS AND LOG
  175. ;------------------------------------------
  176. IF INGROUP("Group-LocalPrt-CieABM")
  177. ;$Result = AddPrinterConnection("\\@DOMAINS0004\Minolta_NH")
  178. $Result = AddPrinterConnection("\\G20220S0004\Minolta_NH")
  179. ;$Result = SetDefaultPrinter("\\G20220S0004\Minolta_NH")
  180. ENDIF
  181. IF INGROUP("Group-LocalPrt-Log")
  182. $Result = AddPrinterConnection("\\G20220S0004\Minolta_Log")
  183. ;$Result = SetDefaultPrinter("\\G20220S0004\Minolta_Log")
  184. ENDIF
  185.  
  186. ;********************************************
  187. AT (13,5) "6. Profiling your Outlook ..."
  188. CALL OL98PRF.SCR
  189. ;****************************
  190. ; E N D O F F I L E .SCR
  191. ;****************************

Autres extraits de codes en Winbatch

Version en cache

21/11/2024 11:30:28 Cette version de la page est en cache (à la date du 21/11/2024 11:30:28) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.

Document créé le 05/10/2009, dernière modification le 28/10/2018
Source du document imprimé : https://www.gaudry.be/sniplet-rf-misc/Logon.scr.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.