Gather input for offline backup
This commit is contained in:
+22
-2
@@ -3,11 +3,32 @@ setlocal
|
|||||||
title Backup User Accounts on %COMPUTERNAME%
|
title Backup User Accounts on %COMPUTERNAME%
|
||||||
color 0e
|
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
|
:prompt-backup-type
|
||||||
cls
|
cls
|
||||||
echo.
|
echo.
|
||||||
set BACKUP_TYPE=y
|
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%]==[Y] goto set-all-users
|
if [%BACKUP_TYPE%]==[Y] goto set-all-users
|
||||||
if [%BACKUP_TYPE%]==[n] goto get-domain
|
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
|
rem --- Set the command line args for performing the migration
|
||||||
set SCANSTATE_USERS=/ue:*\Administrator /ue:*\ekadmin
|
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"
|
set SCANSTATE_XML=/i:"%USMT_STORE%\config\MigUser.xml" /i:"%USMT_STORE%\config\MigDocSystem.xml" /i:"%USMT_STORE%\config\MigCustom.xml"
|
||||||
|
|
||||||
goto start
|
goto start
|
||||||
|
|
||||||
rem --- Get domain to backup
|
rem --- Get domain to backup
|
||||||
|
|||||||
Reference in New Issue
Block a user