Gather input for offline backup

This commit is contained in:
2019-11-26 10:59:13 -05:00
parent 90de6cc2d4
commit c1e0e48ee4
+22 -2
View File
@@ -3,11 +3,32 @@ setlocal
title Backup User Accounts on %COMPUTERNAME%
color 0e
rem --- Prompt for offline backup
:prompt-offline
cls
echo.
set OFFLINE_BACKUP=n
set /p OFFLINE_BACKUP=Run offline? (y/n) [n]:
if [%OFFLINE_BACKUP%]==[y] goto set-offline
if [%OFFLINE_BACKUP%]==[Y] goto set-offline
if [%OFFLINE_BACKUP%]==[n] goto set-online
if [%OFFLINE_BACKUP%]==[N] goto set-online
goto prompt-offline
:set-offline
echo.
set /p OFFLINE_WIN_DIR=Enter the path to the Windows directory:
set OFFLINE="/offlineWinDir:%OFFLINE_WIN_DIR%"
goto prompt-backup-type
:set-online
set OFFLINE=""
:prompt-backup-type
cls
echo.
set BACKUP_TYPE=y
set /p BACKUP_TYPE=Backup all users (y/n):
set /p BACKUP_TYPE=Backup all users? (y/n) [y]:
if [%BACKUP_TYPE%]==[y] goto set-all-users
if [%BACKUP_TYPE%]==[Y] goto set-all-users
if [%BACKUP_TYPE%]==[n] goto get-domain
@@ -21,7 +42,6 @@ set USMT_STORE=%~dp0..\usmt_store\%COMPUTERNAME%
rem --- Set the command line args for performing the migration
set SCANSTATE_USERS=/ue:*\Administrator /ue:*\ekadmin
set SCANSTATE_XML=/i:"%USMT_STORE%\config\MigUser.xml" /i:"%USMT_STORE%\config\MigDocSystem.xml" /i:"%USMT_STORE%\config\MigCustom.xml"
goto start
rem --- Get domain to backup