copy script with new user logic

This commit is contained in:
Michael H.G. Schmidt 2022-06-19 16:40:47 +02:00
parent c825355cc1
commit 2435ab4a2e

View File

@ -2,9 +2,33 @@
set SOURCES=c:\TEMP\W10\sources
set BOOT=boot.wim
set IMAGE=install.esd
set SETTINGS=settings.cmd
set COMPANY_SETTINGS=company\settings.cmd
IF %1.==. GOTO USAGE
rem ===================
rem CONFIGFILE CHECK
rem ===================
rem GLOBAL settings ...
if EXIST %SETTINGS% (
call %SETTINGS%
) else (
set LANG=en-US
)
echo LANG=%LANG%
rem COMPANY settings ...
set support_user=
set support_password=
if NOT EXIST %COMPANY_SETTINGS% (
echo INFO: COMPANY %COMPANY_SETTINGS% NOT FOUND
) else (
echo OK. Loading COMPANY settings ...
call %COMPANY_SETTINGS%
)
echo.
echo =====================
echo Prepare USB Stick ...
@ -12,13 +36,6 @@ echo =====================
set USBDRIVE=%1
if EXIST settings.cmd (
call settings.cmd
) else (
set LANG=en-US
)
echo LANG=%LANG%
if /I %USBDRIVE% == C: (
echo ERROR: cannot use drive %USBDRIVE% !
exit /b
@ -53,21 +70,33 @@ set answer=
:CONT
rem ask for user ...
echo.
set MYUSER=support
set /p MYUSER="Username (%MYUSER%)? "
set MYUSER=testuser
if "@%support_user%" NEQ "@" (
set MYUSER=%support_user%
) else (
echo.
set /p MYUSER="Username (%MYUSER%)? "
)
echo MYUSER = %MYUSER%
rem ask for real name ...
echo.
set MYNAME=Support User
set /p MYNAME="Display Name (%MYNAME%)? "
set MYNAME=Test User
if "@%support_name%" NEQ "@" (
set MYNAME=%support_name%
) else (
echo.
set /p MYNAME="Display Name (%MYNAME%)? "
)
echo MYNAME = %MYNAME%
rem ask for a password ...
echo.
set MYPASS=
set /p MYPASS="Password (not set)? "
if "@%support_password%" NEQ "@" (
set MYPASS=%support_password%
) else (
echo.
set /p MYPASS="Password (not set)? "
)
echo MYPASS = %MYPASS%
echo.