@echo off echo. rem Netzwerk-Einstellungen sichern und wieder herstellen rem ---------------------------------------------------- rem (c) 2007 Markus Steudle if not exist "%USERPROFILE%\Anwendungsdaten\NetzwerkProfil\" ( mkdir "%USERPROFILE%\Anwendungsdaten\NetzwerkProfil\" ) echo %date% %time% >> "%USERPROFILE%\Anwendungsdaten\NetzwerkProfil\logfile.txt" echo %USERPROFILE% >> "%USERPROFILE%\Anwendungsdaten\NetzwerkProfil\logfile.txt" echo %USERNAME% >> "%USERPROFILE%\Anwendungsdaten\NetzwerkProfil\logfile.txt" echo %1 %2 %3 >> "%USERPROFILE%\Anwendungsdaten\NetzwerkProfil\logfile.txt" if "%1"=="" ( echo Es wurden keine Parameter angegeben! echo. pause exit /b ) if "%2"=="" ( set ProfilName=Profil_%date% ) else ( set ProfilName=%2 ) set Profil="%USERPROFILE%\Anwendungsdaten\NetzwerkProfil\%ProfilName%.txt" if "%1"=="sichern" ( echo Speichere das aktuelle Netzwerkprofil als %ProfilName% ... echo. netsh -c interface dump > %Profil% ) if "%1"=="herstellen" ( echo Stelle das Netzwerkprofil %ProfilName% wieder her... echo. netsh -f %Profil% echo. ipconfig /all echo. echo. ) echo ---------------------- >> "%USERPROFILE%\Anwendungsdaten\NetzwerkProfil\logfile.txt" echo Bin fertig ;-) echo. pause