@echo off cls setlocal REM ######################## REM # Automate Student Tasks REM ######################## :mainMenu echo. echo YOU MUST RUN THIS AS AN ADMINISTRATOR echo. echo ##################################### echo # 1. Configure Student Wi-Fi echo # 2. Configure Printing echo # 3. Install MS Office For Students echo # 4. Drop Back To A Command Prompt echo ##################################### echo. set /p varChoice="Enter An Option: " if %varChoice%==1 goto :studentWiFi if %varChoice%==2 goto :printerSetup if %varChoice%==3 goto :msofficeSetup if %varChoice%==4 goto :eof REM ############################################## REM # Delete, Then Re-Add Avondale Student Profile REM ############################################## :studentWiFi netsh wlan delete profile name="Avondale" netsh wlan add profile filename=%cd%\Wi-Fi-Avondale-Student.xml netsh interface set interface "Wi-Fi" disabled ping -n 6 127.0.0.1>nul netsh interface set interface "Wi-Fi" enabled goto :mainMenu REM ####################################################### REM # Connect To Print Server, Install PaperCut and Printer REM ####################################################### :printerSetup set exeLocation=\\lmpr0801.avondale.edu.au\PCClient\win set /p varUser="Please Enter Your UserName e.g. s14054524: " set /p driveLetter="Please Enter A Drive Letter e.g. Z: " if exist %driveLetter% ( net use %driveLetter% /delete /y net use %driveLetter% %exeLocation% /savecred ) else ( net use %driveLetter% %exeLocation% /savecred ) "%ProgramFiles(x86)%\PaperCut MF Client\unins000.exe" /verysilent del %USERPROFILE%\pc-auth.cookie del %USERPROFILE%\pc-client.properties "%driveLetter%\client-local-install.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- "%SystemRoot%\system32\rundll32.exe" printui.dll,PrintUIEntry /dn /n \\lmpr0801.avondale.edu.au\MyPrintQueue "%SystemRoot%\system32\rundll32.exe" printui.dll,PrintUIEntry /in /n \\lmpr0801.avondale.edu.au\MyPrintQueue "%SystemRoot%\system32\rundll32.exe" printui.dll,PrintUIEntry /y /n \\lmpr0801.avondale.edu.au\MyPrintQueue net use %driveLetter% /delete /y "%ProgramFiles(x86)%\PaperCut MF Client\pc-client.exe" --user=%varUser% --neverrequestidentity=n goto :mainMenu :msofficeSetup robocopy /mir /256 /r:6 /w:1 %cd%\packages.d\16.0.6741.2048 %temp%\16.0.6741.2048 start /b /d %temp%\16.0.6741.2048 %temp%\16.0.6741.2048\Setup.exe goto :mainMenu endlocal REM ############# REM # START NOTES REM ############# REM # 2-clause license ("Simplified BSD License" or "FreeBSD License") REM # REM # Copyright © 2018, Adam Brian Chilcott REM # All rights reserved. REM # REM # Redistribution and use in source and binary forms, with or without REM # modification, are permitted provided that the following conditions are met: REM # REM # 1. Redistributions of source code must retain the above copyright notice, this REM # list of conditions and the following disclaimer. REM # 2. Redistributions in binary form must reproduce the above copyright notice, REM # this list of conditions and the following disclaimer in the documentation REM # and/or other materials provided with the distribution. REM # REM # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND REM # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED REM # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE REM # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR REM # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES REM # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; REM # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND REM # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT REM # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS REM # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. REM # REM # The views and conclusions contained in the software and documentation are those REM # of the authors and should not be interpreted as representing official policies, REM # either expressed or implied, of the FreeBSD Project. REM ########### REM # END NOTES REM ###########