Jump to content

Rechnername per .batch-Datei ändern?


Der letzte Beitrag zu diesem Thema ist mehr als 180 Tage alt. Bitte erstelle einen neuen Beitrag zu Deiner Anfrage!

Recommended Posts

Posted

Hallo,

 

ich habe eine .bat-Datei, daß drine folgendes steht:

@for /F "tokens=10,*" %%i in ('ipconfig /all^|find "Physik"') do @set MAC=%%i

if %MAC% == 00-11-2F-4B-39-37 goto Netz1
if %MAC% == 00-13-D8-2E-G4-C0 goto Netz2
if %MAC% == 00-11-D9-85-1A-51 goto Netz3
if %MAC% == 00-11-D8-89-24-89 goto Netz4


:Netz1
netsh interface ip set address name="LAN-Verbindung 2" source=static addr=130.133.99.101 mask=255.255.255.0 gateway="130.133.88.1" gwmetric=1
exit

:Netz2
netsh interface ip set address name="LAN-Verbindung 2" source=static addr=130.133.99.102 mask=255.255.255.0 gateway="130.133.88.1" gwmetric=1

exit

:Netz3
netsh interface ip set address name="LAN-Verbindung 2" source=static addr=130.133.99.103 mask=255.255.255.0 gateway="130.133.88.1" gwmetric=1

exit

:Netz4
netsh interface ip set address name="LAN-Verbindung 2" source=static addr=130.133.99.104 mask=255.255.255.0 gateway="130.133.88.1" gwmetric=1

exit

 

und so werden die IP-Adressen geändert.

Jetzt wollte ich fragen, ob auch noch möglich wäre, daß man den Rechnername vom jeweiligen Rechner ändert?

 

Gruß,

G.M.

Der letzte Beitrag zu diesem Thema ist mehr als 180 Tage alt. Bitte erstelle einen neuen Beitrag zu Deiner Anfrage!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...