dbustamante
IS-IT--Management
Hey everyone I’m working on a script that I will be using for all my new IT members so configuring PC's won’t be so time consuming. so far all the commands are working fine but every time the selection is made it run’s the command then exit's and I have to start it up again when all I really want it to do is once a selection has been made it goes back to the menu for more options.
This is what I have so far any help would be greatly appreciated!
Code:
@ECHO OFF
COLOR 2
CLS
ECHO .................................................................
ECHO .WELCOME TO THE RIO GRANDE DETENTION IT NEW COMPUTER SET UP FILE.
ECHO .IN THIS FILE YOU WILL GO STEP BY STEP ON SETTING UP A NEW .
ECHO .COMPUTER FROM STRACH. THERE WILL BE SEVERAL OPTIONS TO CHOOSE .
ECHO .FROM AND IF DONE IN ORDER YOU SHOULD NOT HAVE ANY PROBLEMS. .
ECHO .................................................................
ECHO ................................................
ECHO .SELECT 1-9 START CONFIGURING PC .
ECHO ................................................
ECHO 1 - CHANGE WSCRIPT TO CSCRIPT
ECHO 2 - Disable Firewall
ECHO 3 - SHOW ALL NETWORK CONNECTIONS
ECHO 4 - CHANGE COMPUTER NAME
ECHO 5 - JOIN PC TO DOMAIN
ECHO 6 - COPY ALL SHORTCUTS TO All USER DESKTOPS
ECHO 7 - ENABLE REMOTE DESKTOP
ECHO 8 - OPEN VNC FOR INSTALL
ECHO 9 - EXIT
SET /P USERINP=CHOOSE A NUMBER(1-9):
SET USERINP=%USERINP:~0,1%
IF "%USERINP%"=="1" GOTO 1
IF "%USERINP%"=="2" GOTO 2
IF "%USERINP%"=="3" GOTO 3
IF "%USERINP%"=="4" GOTO 4
IF "%USERINP%"=="5" GOTO 5
IF "%USERINP%"=="6" GOTO 6
IF "%USERINP%"=="7" GOTO 7
IF "%USERINP%"=="8" GOTO 8
IF "%USERINP%"=="9" GOTO 9
:1 CHANGE WSCRIPT TO CSCRIPT
"\\RGDC\IT\SCRIPTS\change wscript to cscript.bat"
GOTO MENU
:2 disable firewall
netsh firewall set opmode disable
GOTO MENU
:3 SHOW ALL NETWORK CONNECTIONS
START "%USERPROFILE%" EXPLORER.EXE /N,::{7007ACC7-3202-11D1-AAD2-00805FC1270E} /S/Y
GOTO MENU
:4 CHANGE COMPUTER NAME
SET /P PCNAME=Please enter your name:
REG ADD HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName /v ComputerName /t REG_SZ /d %PCNAME%
GOTO MENU
:5 JOIN PC TO DOMAIN
"\\RGDC\IT\SCIPTS\JOINPCTODOMAIN.BAT"
GOTO MENU
:6 COPY ALL SHORTCUTS TO USER DESKTOPS
XCOPY \\10.37.224.10\IT\WEBSITES "C:\DOCUMENTS AND SETTINGS\ALL USERS\DESKTOP" /O /X /E /H /K
GOTO MENU
:7 Enable remote Desktop
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
GOTO MENU
:8 OPEN VNC FOR INSTALL
"\\RGDC\iT\Applications\vnc-4_1_3-x86_win32.exe"
GOTO MENU
:9
EXIT
This is what I have so far any help would be greatly appreciated!