G-Stress Posted February 3, 2008 Share Posted February 3, 2008 Hey guys, I'm trying to create a little network script to renew, release ip's etc. mainly to familiarize myself with batch scripting better. Everything seems to work just fine so far, but one thing that is confusing me is in my script even though I have "@echo off" it still says ECHO is off next to each string or text. Then on the part where it says "Enter Option Here" when the user enters an option it starts the text right after the word here (Enter Option Hereipconfig) Is there a way to add a space after the word here or make it drop to the next line when the user enters their option? @echo off echo IPCONFIG echo ======== echo echo ipconfig echo ipconfig all echo release echo renew echo flushdns echo reset winsock echo echo echo echo set input= set /p input= Enter Option Here echo echo echo if %input%==ipconfig goto ipconfig if %input%==release goto release if %input%==renew goto renew if %input%==flushdns goto flushdns if %input%==reset winsock goto winsock if %input%==ipconfig all goto ipconfigall :ipconfig c:windowssystem32ipconfig.exe pause exit :ipconfigall c:windowssystem32ipconfig.exe /all pause exit :release c:windowssystem32ipconfig.exe /release pause exit :renew c:windowssystem32ipconfig.exe /renew pause exit :flushdns c:windowssystem32ipconfig.exe /flushdns pause exit :winsock c:windowssystem32netsh.exe winsock reset all pause exit ::exit Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.