;======================================================================== ; Script KIXTART de connexion pour les utilisateurs du domaine. ; ; 21/12/1999 ; Ajouté chg mot de passe de VNC ; retiré ocxreg.cmd if UCASE("%TYPCONFIG%") = "S" ; ; Si c'est un SERVEUR pas de script SVP .... exit endif ;CLS ;COLOR r+/n ;BIG ;? "MEILLEURS" ;? "VOEUX 2000" ;SMALL ;COLOR n/n ;? "de la part de toute l'équipe informatique." ;? " " ;? " " ? " " ? "Configuration de votre machine en cours ..." ;=================================================================== ; Suppression de la recherche acceleree microsoft qui genere des connexions drives ; aleatoires... ;=================================================================== if exist ("%systemroot%\PROFILES\All Users\Menu Démarrer\Programmes\Démarrage\Microsoft Recherche accélérée.lnk") DEL "%systemroot%\PROFILES\All Users\Menu Démarrer\Programmes\Démarrage\Microsoft Recherche accélérée.lnk" endif ;======================================================================== ; Configuration du profile HOME SERVER ;======================================================================== $SERVEUR="" $SERVEUR=readprofilestring("@LDRIVEusers.txt","home_server","@userid") if @error $SERVEUR="" else $SERVEUR=UCASE($SERVEUR) endif SELECT CASE $SERVEUR = "MOS" use e: "\\cphmosnt001\commun" use l: "\\nts01\commun" CASE $SERVEUR = "CHA" ; use e: "\\nts01\commun" use e: "\\cphchant001\commun" use l: "\\nts01\commun" CASE $SERVEUR = "LLV" ; use e: "\\nts01\commun" use e: "\\cphllvnt001\commun" use l: "\\nts01\commun" CASE $SERVEUR = "TOU" use e: "\\nts01\commun" use r: "\\nts01\tower" CASE $SERVEUR = "" use e: "\\nts01\commun" ENDSELECT ;======================================================================== ; Configuration du profile Exchange. ;======================================================================== if UCASE("%TYPCONFIG%") = "H" or UCASE("%TYPCONFIG%") = "L" goto "suite1" endif $SERVMAIL="" $SERVMAIL=readprofilestring("@LDRIVEusers.txt","mail_server","$SERVEUR") if @error = 0 and $SERVMAIL<>"" shell "cmd /c copy %logonserver%\netlogon\exchange.prf %SystemDrive%\temp > %SystemDrive%\temp\logon.log" shell "cmd /c fixprf %SystemDrive%\temp\exchange.prf %username% %username% $SERVMAIL >> %SystemDrive%\temp\logon.log" ; shell "cmd /c pushd '%SystemDrive%\program files\windows messaging' >> %SystemDrive%\temp\logon.log" shell 'cmd /c "%SystemDrive%\program files\windows messaging\newprof.exe" -p %SystemDrive%\temp\exchange.prf -x >> %SystemDrive%\temp\logon.log' else ? "" ? "Erreur @error lors de la lecture du profil MESSAGERIE %username%" ? "Veuillez prévenir l'informatique. Merci" ? "Tapez sur ENTER pour CONTINUER..." gets $xxxx endif ;======================================================================== ; Connexion BDS ;======================================================================== :suite1 SELECT CASE $SERVEUR = "MOS" use g: "\\nts01\bds" CASE $SERVEUR = "CHA" use g: "\\nts01\bds" CASE $SERVEUR = "LLV" use g: "\\nts01\bds" CASE $SERVEUR = "TOU" use g: "\\nts01\bds" CASE $SERVEUR = "" use g: "\\nts01\bds" ENDSELECT ;======================================================================== ; Connexion de l'imprimante du service ;======================================================================== ; pour corriger le bug qui existait dans la creation du profil par défaut $err=delprinterconnection("\\NTS01\INF0") if UCASE("%TYPCONFIG%")<>"H" AND UCASE("%TYPCONFIG%")<>"L" AND "%agence%"<>"" $PRINTSERVER="" $PRINTSERVER=READPROFILESTRING("@LDRIVEusers.txt","printer","%agence%") if @error = 0 $nbprinter=enumkey("HKEY_CURRENT_USER\printers\Connections",0) if $nbprinter = "" or @error<>0 shell "cmd /c con2prt /cd $PRINTSERVER >> %SystemDrive%\temp\logon.log" ; use lpt1: "$PRINTSERVER" else shell "cmd /c con2prt /c $PRINTSERVER >> %SystemDrive%\temp\logon.log" ; use lpt1: "$PRINTSERVER" endif endif $PRINTSERVER3="" $PRINTSERVER3=READPROFILESTRING("@LDRIVEusers.txt","printer_user","%agence%_@USERID") if @error = 0 AND $PRINTSERVER3 <> "" $rc=addprinterconnection("$PRINTSERVER3") ; use lpt1: "$PRINTSERVER3" endif $PRINTSERVER2="" $PRINTSERVER2=READPROFILESTRING("@LDRIVEusers.txt","printer2","%agence%") if @error = 0 AND $PRINTSERVER2 <> "" $rc=addprinterconnection("$PRINTSERVER2") if $rc <> 0 ? "Erreur lors de la configuration de la seconde imprimante" endif endif endif ;======================================================================== ; Exécution de Scripts personnalisés ;======================================================================== if exist ("%logonserver%\netlogon\%username%.bat") shell "cmd /c call %logonserver%\netlogon\%username%.bat" endif ; montage du disque IT2 if INGROUP ("IT2") use F: "\\nts01\finsoft" endif ; Montage du répertoire AS400 Jokerv7 ;if INGROUP ("LUCA") ; use I: "\\tai400\jokerv7" ;endif ; Montage du disque Tbuilder if INGROUP ("Tbuilder") use J: "\\cphtount005\tbuilder" endif ; Désactivé car DUX/DUD ne veut pas monter le disque d'office - question de sécurité... ;if INGROUP ("Nova_analyst") OR INGROUP ("Nova_Lecture") OR INGROUP ("Nova_user") ; use K: "\\nts04\trilog" ;ENDIF ; montage du disque SITE WEB MRK if INGROUP ("MRK") use P: "\\cphtount005\sitemrk" use Q: "\\cphtount005\vitrine" endif ;======================================================================== ; Upgrades à appliquer ;======================================================================== if exist ("c:\relcph3.txt") shell "cmd /c del c:\relcph3.txt" endif if exist ("c:\relcph4.txt") else ? "Application du release CPH.DLL + texte contrat en cours..." shell "cmd /c %logonserver%\netlogon\cphdll2.exe" shell "cmd /c echo version >c:\relcph4.txt" endif ; Modif registry pour pouvoir visualiser des documents powerpoint a partir d'IE 5.0 ; Modification de VNC ; Ajout de nouveaux modeles if exist ("c:\relcph41.txt") else $rc = delvalue("HKEY_CLASSES_ROOT\Powerpoint.Show.8","BrowserFlags") shell "CMD /C regedit /S %logonserver%\netlogon\vnc_user.reg" shell "cmd /c %logonserver%\netlogon\modele2.exe" shell "cmd /c echo version >c:\relcph41.txt" endif if exist ("c:\relcph43.txt") else shell "cmd /c %logonserver%\netlogon\releas43.exe" shell "cmd /c echo version >c:\relcph43.txt" endif if exist ("c:\relcph44.txt") else ; avant la valeur BrowserFlags était égale à 0x00000008 $rc = delvalue("HKEY_CLASSES_ROOT\Word.Document.8","BrowserFlags") $rc = delvalue("HKEY_CLASSES_ROOT\Excel.Sheet.8","BrowserFlags") shell "cmd /c %logonserver%\netlogon\releas44.exe" shell "cmd /c echo version >c:\relcph44.txt" endif if ( @WKSTA="FOR001" OR @WKSTA="FOR002" OR @WKSTA="FOR004" OR @WKSTA="FOR005" OR @WKSTA="FOR010" OR @WKSTA="FOR013" OR @WKSTA="FOR011" OR @WKSTA="FOR012" OR @WKSTA="FOR015" OR @WKSTA="INF002" ) if exist ("c:\relforma.txt") else shell "cmd /c %logonserver%\netlogon\forma.exe" shell "cmd /c echo version >c:\relforma.txt" endif use Q: "\\tai400\jokerv7" /USER:J75REC /PASSWORD:J75REC endif ; A desactiver pour le changement de SAPS if existkey("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SPRDRNT\Parameters\Saps0\path") ; $remplacant="NTS03" ; $aremplacer="CPHTOUNT005" $aremplacer="CPHTOUNT005" $remplacant="NTS03" ; ; Remplacement du Most Recent Used dans SAPS $clereg="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SPRDRNT\MRU_Ports" $datreg="1" GOSUB "ROUTINE" ; ; Remplacement des ports de SAPS0 $clereg="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SPRDRNT\Parameters\Saps0" $datreg="path" GOSUB "ROUTINE" ; ; Remplacement des ports de SAPS1 $clereg="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SPRDRNT\Parameters\Saps1" $datreg="path" GOSUB "ROUTINE" ; ; Remplacement des ports de SAPS2 $clereg="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SPRDRNT\Parameters\Saps2" $datreg="path" GOSUB "ROUTINE" ; ; Remplacement des ports de SAPS3 $clereg="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SPRDRNT\Parameters\Saps3" $datreg="path" GOSUB "ROUTINE" endif exit :ROUTINE if existkey("$clereg\$datreg") $valeur="" $rc=0 $valeur=readvalue("$clereg","$datreg") ; ? "$clereg" ; ? "ancien $datreg = $valeur " $rc=instr($valeur,"$aremplacer") if ( $rc <> 0 ) $valeur1=substr($valeur,1,$rc-1)+"$remplacant"+substr($valeur,$rc+len($aremplacer),len($valeur)-$rc+len($aremplacer)) ; ? "Nouveau $datreg = $valeur1" $rc=writevalue("$clereg","$datreg","$valeur1","REG_SZ") if ( $rc <> 0 ) ? "Erreur $rc lors de l'écriture de la clé" ? "$clereg" ? "nouveau $datreg = $valeur1" endif else ; ? "------------------------------------> clé non modifiée" endif endif RETURN ;if existkey("HKEY_CURRENT_USER\Printers\Connections\,,NTS01,INF0") ; deltree("HKEY_CURRENT_USER\Printers\Connections\,,NTS01,INF0") ;endif ;if exist ("c:\winnt\forms\vers26.txt") ;else ; l'ocx est dans le self extract de frmcache.exe ; shell "cmd /c attrib -r c:\winnt\forms\*.* /s >nul" ; shell "cmd /c del c:\winnt\forms\*.* /s /q >nul" ; shell 'cmd /c e:\software\frmcache.exe' ; shell 'cmd /c del c:\winnt\forms\vers25.txt' ; shell "cmd /c echo version26 >c:\winnt\forms\vers26.txt" ;endif ;if exist ("c:\appcph7\ocx\DOCCRE.OCX") ; shell "cmd /c e:\software\ocxreg.cmd" ;endif ; ;shell 'regsvr32.exe c:\appcph7\ocx\Doc_credit.ocx' ;shell 'regsvr32.exe c:\appcph7\ocx\DOCCRE.ocx' ;shell 'regsvr32.exe c:\appcph7\ocx\Messagerie_credit.ocx' ;shell 'regsvr32.exe c:\appcph7\ocx\MSGCRD.ocx' ;shell 'regsvr32.exe c:\appcph7\ocx\msflxgrd.ocx' ; ; désactivé car maintenant les 4512 sont ok. ; ;if exist ("E:\software\majxerox.cmd") ; shell "CMD /C e:\software\majxerox.cmd" ;endif ; ; On enleve le driver qui ne fonctionne pas pour une 4517, le driver ; sera mis a jour automatiquement par le serveur des la premiere ; impression ;if $SERVEUR = "CHA" ; shell "cmd /c ren c:\winnt\system32\spool\drivers\w32x86\2\xeroxpcl.dll xer4515.dll" ;endif