OK, here it goes... stay with me on this.
The main batch file has a menu, that uses netsh, and calls settings from one of 3 different txt files that hold the ip settings for that particular menu choice (menu choices of Office 1, Office 2, or home) the 2 offices are static ip info, the home is DHCP. it works this way, but some of the users are confused by dos boxes and no mouse, so i'd like to do a vb script or something with buttons or radio buttons, etc
Here's the main batch file
+++++++++++++++++++++++++++++++++++++++++++
@echo off
title IP Configuration Batch File
setlocal
set OK=N
:again
set /p choice=Please enter 1[Office 1], 2[Office 2], 3[Home] or END ??
if /i [%choice%]==[END] endlocal&goto end
if [%choice%]==[] goto again
if [%choice%]==[1] goto 1
if [%choice%]==[2] goto 2
if [%choice%]==[3] goto 3
set /p xxx=wrong entry, press any key to exit.
endlocal
goto end
:1
echo NIC setting for Office 1 being configured.....
@netsh exec Office1.txt
set /p see=IP changed successfully to Office 1 Settings [9]see new setting [Enter]exit...
if [%see%]==[9] goto show
echo Ending IP Configuration
goto end
:2
echo NIC setting for Office 2 being configured.....
@netsh exec Office2.txt
set /p see=IP changed successfully to Office 2 Settings [9]see new setting [Enter]exit...
if [%see%]==[9] goto show
echo Ending IP Configuration
goto end
:3
echo NIC setting for Home being configured.....
@netsh exec Home.txt
set /p see=IP changed successfully to Home Settings [9]see new setting [Enter]exit...
if [%see%]==[9] goto show
echo Ending IP Configuration
goto end
:show
@netsh int ip show config
:end
@echo on
cls
++++++++++++++++++++++++++++++++++
Here's the config file (without specific ip addresses, obviously)that is used for Office1 and Office2 (they're both identical, asside from the actual ip addresses.) STATIC IP
++++++++++++++++++++++++++++++++++
# ----------------------------------
# Interface IP Configuration
# ----------------------------------
pushd interface ip
# Interface IP Configuration for "Local Area Connection"
set address name="Local Area Connection" source=static addr=xxx.xxxx.xx mask=xxx.xxx.xxx.xxx
set address name="Local Area Connection" gateway=xxx.xx.xx.x gwmetric=0
set dns name="Local Area Connection" source=static addr=xxx.xx.xx.xxx register=primary
popd
# End of interface IP configuration
++++++++++++++++++++++++++++++++++
Here's the home.txt config file (DHCP)
++++++++++++++++++++++++++++++++++
# ----------------------------------
# Interface IP Configuration
# ----------------------------------
pushd interface ip
# Interface IP Configuration for "Local Area Connection"
set address name="Local Area Connection" source=dhcp
set dns name="Local Area Connection" source=dhcp register=primary
set wins name="Local Area Connection" source=dhcp
popd
# End of interface IP configuration