[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-clonage/sources/paquet_post-clonage/temp/clone/ -> modifip4.bat (source)

   1  @echo off
   2  title Modification de la configuration IP
   3  @cd c:\
   4  @echo on
   5  
   6  @echo *******************************
   7  @echo * MODIF DES PARAMETRES RESEAU *
   8  @echo *******************************
   9  @echo .
  10  @echo *****************************
  11  @echo * DEFINITION DES CONSTANTES *
  12  @echo *****************************
  13  @echo .
  14  
  15  @call C:\temp\clone\params.bat > NUL
  16  @type C:\temp\clone\params.bat
  17  
  18  if exist C:\temp\clone\temoin_dhcp.txt set DHCP=oui
  19  
  20  @echo .
  21  @echo ********************************
  22  @echo * RECUPERATION DE L ADRESSE IP *
  23  @echo ********************************
  24  @echo .
  25  
  26  @call C:\temp\clone\ip.bat > NUL
  27  @type C:\temp\clone\ip.bat
  28  
  29  
  30  @echo .
  31  @echo *****************
  32  @echo * MODIFICATIONS *
  33  @echo *****************
  34  @echo .
  35  
  36  @echo Les operations de changement d'IP, DNS,...
  37  @echo sont assez longues.
  38  @echo Soyez patient...
  39  @echo .
  40  
  41  @if "%DHCP%" == "oui" goto dhcp
  42  @goto suite
  43  :dhcp
  44  @echo PASSAGE EN CLIENT DHCP
  45  netsh interface ip set address "Connexion au r‚seau local" dhcp
  46  @echo ========================================================
  47  @goto suite1
  48  
  49  :suite
  50  @rem Si l'IP ou le masque est vide, on ne change pas l'IP.
  51  @rem Donc on reste en DHCP puisque le dispositif passe le modèle en DHCP avant le clonage
  52  @if "x%IP%" == "x" goto suite1
  53  @if "x%NETMASK%" == "x" goto suite1
  54  @echo MODIFICATION IP
  55  @if "%GW%" == "none" goto suite0
  56  netsh interface ip set address "Connexion au r‚seau local" static %IP% %NETMASK% %GW% 1 
  57  @echo ========================================================
  58  @goto suite1
  59  :suite0
  60  netsh interface ip set address "Connexion au r‚seau local" static %IP% %NETMASK% %GW%
  61  @echo ========================================================
  62  
  63  :suite1
  64  @if "x%DNS1%" == "x" goto suite2
  65  @echo MODIFICATION DNS
  66  netsh interface ip delete dns "Connexion au r‚seau local" all
  67  @echo ========================================================
  68  @if "%DNS1%" == "aucun" goto suite2
  69  netsh interface ip set dns "Connexion au r‚seau local" static %DNS1%
  70  @rem netsh interface ip add dns "Connexion au r‚seau local" %DNS2% %RANG_eventuel% 
  71  @echo ========================================================
  72  
  73  
  74  :suite2
  75  @if "x%WINS%" == "x" goto suite3
  76  @echo MODIFICATION WINS
  77  netsh interface ip delete wins "Connexion au r‚seau local" all
  78  @echo ========================================================
  79  @if "%WINS%" == "aucun" goto suite3
  80  netsh interface ip set wins "Connexion au r‚seau local" static %WINS%
  81  call c:\temp\clone\corrige_options_wins.exe
  82  @echo ========================================================
  83  
  84  
  85  :suite3
  86  @echo .
  87  @echo *****************
  88  @echo * RECAPITULATIF *
  89  @echo *****************
  90  @echo .
  91  ipconfig /all
  92  
  93  @rem pause


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1