diff --git a/windick.cmd b/windick.cmd index 0f3a0f0..1c57704 100644 --- a/windick.cmd +++ b/windick.cmd @@ -15,6 +15,7 @@ FOR %%1 in (1 2 3 4 5 6 7 8 9) DO (CALL SET "ARG%%1=%%%%1%%") FOR %%1 in (1 2 3 4 5 6 7 8 9) DO (IF DEFINED ARG%%1 SET "ARGZ=%%1"&&CALL SET "ARGX=%%ARG%%1%%"&&CALL:ARGUE) IF DEFINED ARG1 FOR %%G in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO ( FOR %%1 in (1 2 3 4 5 6 7 8 9) DO (IF DEFINED ARG%%1 CALL SET "ARG%%1=%%ARG%%1:%%G=%%G%%")) +IF "%PROG_FOLDER%"=="X:\$" IF "%SystemDrive%"=="X:" SET "WINPE_BOOT=1" CALL:MOUNT_INT&&IF DEFINED ARG1 SET "PROG_MODE=COMMAND"&&GOTO:COMMAND_MODE FOR /F "TOKENS=1 DELIMS=: " %%a IN ('DISM') DO (IF "%%a"=="Examples" SET "LANG_PASS=1") IF NOT DEFINED LANG_PASS ECHO.WARNING: Non-english host language/locale. Untested, proceed with caution.&&PAUSE @@ -414,14 +415,14 @@ IF DEFINED ERROR GOTO:MAIN_MENU CALL:PAD_PREV&&CALL:MENU_SELECT CALL SET "ITEM_SELECT=%%$ITEM%SELECT%%%" IF NOT DEFINED ITEM_SELECT GOTO:CUSTOM_MODE -COPY /Y "%LIST_FOLDER%\menu.lst" "$HZ">NUL&&SET "MULTI_LIST=1"&&ECHO.EXEC-LIST>"$LST2" +COPY /Y "%LIST_FOLDER%\menu.lst" "$HZ">NUL&&SET "MLT_SESSION=1"&&ECHO.EXEC-LIST>"$LST2" CALL SET "FULL_TARGET=%ITEM_SELECT%"&&CALL:GROUP_POPULATE -SET "$RUN=%PROG_FOLDER%\$LST2"&&SET "LST_SESSION=1"&&SET "LIVE_APPLY=1"&&CALL:LIST_RUN -SET "MULTI_LIST="&&SET "LST_SESSION="&&GOTO:CUSTOM_MODE +SET "$RUN=%PROG_FOLDER%\$LST2"&&SET "CURR_SESSION=MULTI"&&SET "LST_SESSION=1"&&SET "LIVE_APPLY=1"&&CALL:LIST_RUN +SET "CURR_SESSION="&&SET "MLT_SESSION="&&SET "LST_SESSION="&&SET "PKX_SESSION="&&GOTO:CUSTOM_MODE ::######################################################################### :COMMAND_MODE ::######################################################################### -ECHO.&&IF DEFINED ARG1 IF NOT "%ARG1%"=="/?" IF NOT "%ARG1%"=="-HELP" IF NOT "%ARG1%"=="-AUTOBOOT" IF NOT "%ARG1%"=="-NEXTBOOT" IF NOT "%ARG1%"=="-BOOTMAKER" IF NOT "%ARG1%"=="-DISKMGR" IF NOT "%ARG1%"=="-FILEMGR" IF NOT "%ARG1%"=="-IMAGEPROC" IF NOT "%ARG1%"=="-IMAGEMGR" ECHO.Type windick.cmd -help for more options.&&GOTO:CLEAN_EXIT +IF DEFINED ARG1 IF NOT "%ARG1%"=="/?" IF NOT "%ARG1%"=="-HELP" IF NOT "%ARG1%"=="-AUTOBOOT" IF NOT "%ARG1%"=="-NEXTBOOT" IF NOT "%ARG1%"=="-BOOTMAKER" IF NOT "%ARG1%"=="-DISKMGR" IF NOT "%ARG1%"=="-FILEMGR" IF NOT "%ARG1%"=="-IMAGEPROC" IF NOT "%ARG1%"=="-IMAGEMGR" ECHO.Type windick.cmd -help for more options.&&GOTO:CLEAN_EXIT SET "MOUNT="&&SET "ERROR="&&SET "BRUTE_FORCE="&&SET "PROG_SOURCE=%PROG_FOLDER%"&&CALL:SETS_MAIN&&SET "PAD_TYPE=0" IF "%ARG1%"=="/?" SET "ARG1=-HELP" IF "%ARG1%"=="-HELP" CALL:COMMAND_HELP @@ -454,15 +455,15 @@ IF "%ARG2%"=="-RUN" IF "%ARG3%"=="-ITEM" CALL:MOUNT_REST&&IF DEFINED PARSE_X FOR IF "%ARG2%"=="-RUN" IF "%ARG3%"=="-ITEM" IF DEFINED PARSE_X SET "PARSE_X="&&FOR %%a in (5 6 7 8 9) DO (SET "CAPS_SET=ARG%%a"&&CALL SET "CAPS_VAR=%%ARG%%a%%"&&CALL:CAPS_SET) IF "%ARG2%"=="-RUN" IF "%ARG3%"=="-ITEM" IF DEFINED ARG4 SET "DEL_Z=1"&&SET "ARG3=-LST"&&SET "ARG4=$LSTZ"&&(ECHO.EXEC-LIST&&ECHO.%ARG4%)>"%LIST_FOLDER%\$LSTZ" IF "%ARG2%"=="-RUNBRUTE" IF "%ARG3%"=="-ITEM" IF DEFINED ARG4 SET "DEL_Z=1"&&SET "ARG3=-LST"&&SET "ARG4=$LSTZ"&&(ECHO.EXEC-LIST&&ECHO.%ARG4%)>"%LIST_FOLDER%\$LSTZ" -IF "%ARG2%"=="-RUN" IF "%ARG3%"=="-LST" IF DEFINED ARG4 IF EXIST "%LIST_FOLDER%\%ARG4%" SET "$RUN=%LIST_FOLDER%\%ARG4%"&&IF "%ARG5%"=="-LIVE" SET "LIVE_APPLY=1"&&SET "BRUTE_FORCE=DISABLED"&&SET "LST_SESSION=1"&&CALL:LIST_RUN -IF "%ARG2%"=="-RUN" IF "%ARG3%"=="-LST" IF DEFINED ARG4 IF EXIST "%LIST_FOLDER%\%ARG4%" SET "$RUN=%LIST_FOLDER%\%ARG4%"&&IF "%ARG5%"=="-VHDX" SET "LIVE_APPLY="&&IF DEFINED ARG6 IF EXIST "%IMAGE_FOLDER%\%ARG6%" SET "VDISK=%IMAGE_FOLDER%\%ARG6%"&&SET "BRUTE_FORCE=DISABLED"&&SET "LST_SESSION=1"&&CALL:LIST_RUN -IF "%ARG2%"=="-RUNBRUTE" IF "%ARG3%"=="-LST" IF DEFINED ARG4 IF EXIST "%LIST_FOLDER%\%ARG4%" SET "$RUN=%LIST_FOLDER%\%ARG4%"&&IF "%ARG5%"=="-LIVE" SET "LIVE_APPLY=1"&&SET "BRUTE_FORCE=ENABLED"&&SET "LST_SESSION=1"&&CALL:LIST_RUN -IF "%ARG2%"=="-RUNBRUTE" IF "%ARG3%"=="-LST" IF DEFINED ARG4 IF EXIST "%LIST_FOLDER%\%ARG4%" SET "$RUN=%LIST_FOLDER%\%ARG4%"&&IF "%ARG5%"=="-VHDX" SET "LIVE_APPLY="&&IF DEFINED ARG6 IF EXIST "%IMAGE_FOLDER%\%ARG6%" SET "VDISK=%IMAGE_FOLDER%\%ARG6%"&&SET "BRUTE_FORCE=ENABLED"&&SET "LST_SESSION=1"&&CALL:LIST_RUN -IF "%ARG2%"=="-RUN" IF "%ARG3%"=="-PKX" IF DEFINED ARG4 IF EXIST "%PACK_FOLDER%\%ARG4%" SET "PKX_PACK=%PACK_FOLDER%\%ARG4%"&&IF "%ARG5%"=="-LIVE" SET "LIVE_APPLY=1"&&SET "BRUTE_FORCE=DISABLED"&&SET "PKX_SESSION=1"&&CALL:PKX_RUN -IF "%ARG2%"=="-RUN" IF "%ARG3%"=="-PKX" IF DEFINED ARG4 IF EXIST "%PACK_FOLDER%\%ARG4%" SET "PKX_PACK=%PACK_FOLDER%\%ARG4%"&&IF "%ARG5%"=="-VHDX" SET "LIVE_APPLY="&&IF DEFINED ARG6 IF EXIST "%IMAGE_FOLDER%\%ARG6%" SET "VDISK=%IMAGE_FOLDER%\%ARG6%"&&SET "BRUTE_FORCE=DISABLED"&&SET "PKX_SESSION=1"&&CALL:PKX_RUN -IF "%ARG2%"=="-RUNBRUTE" IF "%ARG3%"=="-PKX" IF DEFINED ARG4 IF EXIST "%PACK_FOLDER%\%ARG4%" SET "PKX_PACK=%PACK_FOLDER%\%ARG4%"&&IF "%ARG5%"=="-LIVE" SET "LIVE_APPLY=1"&&SET "BRUTE_FORCE=ENABLED"&&SET "PKX_SESSION=1"&&CALL:PKX_RUN -IF "%ARG2%"=="-RUNBRUTE" IF "%ARG3%"=="-PKX" IF DEFINED ARG4 IF EXIST "%PACK_FOLDER%\%ARG4%" SET "PKX_PACK=%PACK_FOLDER%\%ARG4%"&&IF "%ARG5%"=="-VHDX" SET "LIVE_APPLY="&&IF DEFINED ARG6 IF EXIST "%IMAGE_FOLDER%\%ARG6%" SET "VDISK=%IMAGE_FOLDER%\%ARG6%"&&SET "BRUTE_FORCE=ENABLED"&&SET "PKX_SESSION=1"&&CALL:PKX_RUN -SET "LST_SESSION="&&SET "PKX_SESSION="&&IF DEFINED DEL_Z SET "DEL_Z="&&DEL /Q /F "%LIST_FOLDER%\$LSTZ">NUL 2>&1 +IF "%ARG2%"=="-RUN" IF "%ARG3%"=="-LST" IF DEFINED ARG4 IF EXIST "%LIST_FOLDER%\%ARG4%" SET "$RUN=%LIST_FOLDER%\%ARG4%"&&IF "%ARG5%"=="-LIVE" SET "LIVE_APPLY=1"&&SET "BRUTE_FORCE=DISABLED"&&SET "CURR_SESSION=EXEC"&&SET "LST_SESSION=1"&&CALL:LIST_RUN +IF "%ARG2%"=="-RUN" IF "%ARG3%"=="-LST" IF DEFINED ARG4 IF EXIST "%LIST_FOLDER%\%ARG4%" SET "$RUN=%LIST_FOLDER%\%ARG4%"&&IF "%ARG5%"=="-VHDX" SET "LIVE_APPLY="&&IF DEFINED ARG6 IF EXIST "%IMAGE_FOLDER%\%ARG6%" SET "VDISK=%IMAGE_FOLDER%\%ARG6%"&&SET "BRUTE_FORCE=DISABLED"&&SET "CURR_SESSION=EXEC"&&SET "LST_SESSION=1"&&SET "VDISK_FLAG=1"&&CALL:LIST_RUN +IF "%ARG2%"=="-RUNBRUTE" IF "%ARG3%"=="-LST" IF DEFINED ARG4 IF EXIST "%LIST_FOLDER%\%ARG4%" SET "$RUN=%LIST_FOLDER%\%ARG4%"&&IF "%ARG5%"=="-LIVE" SET "LIVE_APPLY=1"&&SET "BRUTE_FORCE=ENABLED"&&SET "CURR_SESSION=EXEC"&&SET "LST_SESSION=1"&&CALL:LIST_RUN +IF "%ARG2%"=="-RUNBRUTE" IF "%ARG3%"=="-LST" IF DEFINED ARG4 IF EXIST "%LIST_FOLDER%\%ARG4%" SET "$RUN=%LIST_FOLDER%\%ARG4%"&&IF "%ARG5%"=="-VHDX" SET "LIVE_APPLY="&&IF DEFINED ARG6 IF EXIST "%IMAGE_FOLDER%\%ARG6%" SET "VDISK=%IMAGE_FOLDER%\%ARG6%"&&SET "BRUTE_FORCE=ENABLED"&&SET "CURR_SESSION=EXEC"&&SET "LST_SESSION=1"&&SET "VDISK_FLAG=1"&&CALL:LIST_RUN +IF "%ARG2%"=="-RUN" IF "%ARG3%"=="-PKX" IF DEFINED ARG4 IF EXIST "%PACK_FOLDER%\%ARG4%" SET "PKX_PACK=%PACK_FOLDER%\%ARG4%"&&IF "%ARG5%"=="-LIVE" SET "LIVE_APPLY=1"&&SET "BRUTE_FORCE=DISABLED"&&SET "CURR_SESSION=PACK"&&SET "PKX_SESSION=1"&&CALL:PKX_RUN +IF "%ARG2%"=="-RUN" IF "%ARG3%"=="-PKX" IF DEFINED ARG4 IF EXIST "%PACK_FOLDER%\%ARG4%" SET "PKX_PACK=%PACK_FOLDER%\%ARG4%"&&IF "%ARG5%"=="-VHDX" SET "LIVE_APPLY="&&IF DEFINED ARG6 IF EXIST "%IMAGE_FOLDER%\%ARG6%" SET "VDISK=%IMAGE_FOLDER%\%ARG6%"&&SET "BRUTE_FORCE=DISABLED"&&SET "CURR_SESSION=PACK"&&SET "PKX_SESSION=1"&&SET "VDISK_FLAG=1"&&CALL:PKX_RUN +IF "%ARG2%"=="-RUNBRUTE" IF "%ARG3%"=="-PKX" IF DEFINED ARG4 IF EXIST "%PACK_FOLDER%\%ARG4%" SET "PKX_PACK=%PACK_FOLDER%\%ARG4%"&&IF "%ARG5%"=="-LIVE" SET "LIVE_APPLY=1"&&SET "BRUTE_FORCE=ENABLED"&&SET "CURR_SESSION=PACK"&&SET "PKX_SESSION=1"&&CALL:PKX_RUN +IF "%ARG2%"=="-RUNBRUTE" IF "%ARG3%"=="-PKX" IF DEFINED ARG4 IF EXIST "%PACK_FOLDER%\%ARG4%" SET "PKX_PACK=%PACK_FOLDER%\%ARG4%"&&IF "%ARG5%"=="-VHDX" SET "LIVE_APPLY="&&IF DEFINED ARG6 IF EXIST "%IMAGE_FOLDER%\%ARG6%" SET "VDISK=%IMAGE_FOLDER%\%ARG6%"&&SET "BRUTE_FORCE=ENABLED"&&SET "CURR_SESSION=PACK"&&SET "PKX_SESSION=1"&&SET "VDISK_FLAG=1"&&CALL:PKX_RUN +SET "VDISK_FLAG="&&SET "CURR_SESSION="&&SET "LST_SESSION="&&SET "PKX_SESSION="&&IF DEFINED DEL_Z SET "DEL_Z="&&DEL /Q /F "%LIST_FOLDER%\$LSTZ">NUL 2>&1 EXIT /B :COMMAND_DISKMGR IF DEFINED ARG2 IF "%ARG3%"=="-DISKUID" IF DEFINED ARG4 SET "DISK_TARGET=%ARG4%"&&CALL:DISK_DETECT>NUL @@ -570,7 +571,7 @@ IF "%TITX%"=="7" SET "TITLE_X= Difference base-lists to compare editions or to m IF "%TITX%"=="8" SET "TITLE_X= Update the EFI files, program, or boot media while booted into recovery." IF "%TITX%"=="9" SET "TITLE_X= SetupComplete/RunOnce items apply to Current-Environment (Live), but are simply delayed." IF "%TITX%"=="0" SET "TITLE_X= Build, administrate and backup your Windows in a native WinPE recovery environment." -IF "%MENU_MODE%"=="BASIC" SET "TITLE_X=") +IF "%MENU_MODE%"=="BASIC" SET "TITLE_X=" CALL:TITLE_X EXIT /B :TITLE_X @@ -739,7 +740,7 @@ IF "%FOLDER_MODE%"=="ISOLATED" FOR %%a in (CACHE IMAGE PACK LIST BOOT) DO (SET " IF "%FOLDER_MODE%"=="UNIFIED" FOR %%a in (CACHE IMAGE PACK LIST BOOT) DO (SET "%%a_FOLDER=%PROG_SOURCE%") IF NOT DEFINED XLR0 SET "XLR0="&&SET "XLR1="&&SET "XLR2="&&SET "XLR3="&&SET "XLR4="&&SET "XLR5="&&SET "XLR6="&&SET "XLR7="&&SET "XLR8="&&SET "XLR9="&&CALL:PAD_LINE>NUL 2>&1 IF NOT DEFINED COLOR0 FOR %%a in (0 1 2 3 4 5 6 7 8 9) DO (SET "COLOR%%a="&&SET "COLOR%%a=%%XLR%%a%%") -FOR %%a in (SELECTX SELECTY SELECTZ APPLYDIR CAPTUREDIR IMAGEINDEX $VHDX ERROR LIVE_APPLY $HALT $HALTX) DO (SET "%%a=") +FOR %%a in (SELECTX SELECTY SELECTZ APPLYDIR CAPTUREDIR IMAGEINDEX $VHDX ERROR LIVE_APPLY $HALT $HALTX VDISK VDISK_LTR VDISK_ATTACHED VDISK_FLAG DUAL_SESSION PKX_SESSION LST_SESSION CURR_SESSION LAST_SESSION) DO (SET "%%a=") IF "%PROG_MODE%"=="COMMAND" EXIT /B FOR %%a in (1 2 3 4 5) DO (SET "ADDFILE_NUM=%%a"&&CALL SET "ADDFILE_CHK=%%ADDFILE_%%a%%"&&CALL:ADDFILE_CHK) IF "%PROG_MODE%"=="RAMDISK" FOR %%a in (VHDX_SLOT0 VHDX_SLOT1 VHDX_SLOT2 VHDX_SLOT3 VHDX_SLOT4 VHDX_SLOT5 VHDX_SLOT6 VHDX_SLOT7 VHDX_SLOT8 VHDX_SLOT9) DO (SET "OBJ_FLD=%PROG_SOURCE%"&&CALL SET "OBJ_CHK=%%a"&&CALL:OBJ_CLEAR) @@ -785,7 +786,7 @@ IF NOT DEFINED PICK GOTO:PICK_ERROR IF NOT DEFINED NOCLS CLS IF NOT DEFINED NOPAD CALL:PAD_LINE CALL:BOXT1&&SET "NLIST=%PICK%"&&CALL:FILE_LIST&&CALL:BOXB1&&IF NOT DEFINED NOPAD CALL:PAD_LINE -CALL:PAD_PREV&&FOR %%a in (ERROR SELECT LIST_NAME $MAKE $PICK $ELECT $ELECT$ $HEAD $PICK_PATH $PICK_BODY $PICK_EXT FILE_NAME NOCLS NOPAD) DO (SET "%%a=") +CALL:PAD_PREV&&FOR %%a in (ERROR SELECT $LIST_NAME $MAKE $PICK $ELECT $ELECT$ $HEAD $PICK_PATH $PICK_BODY $PICK_EXT FILE_NAME NOCLS NOPAD) DO (SET "%%a=") SET /P "SELECT=$>>"&&FOR %%G in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO (CALL SET "SELECT=%%SELECT:%%G=%%G%%") IF "%SELECT%"=="@" IF "%PICK%"=="VHDX" SET "LIVE_APPLY=1"&&GOTO:PICK_ERROR IF "%SELECT%"=="0" IF NOT "%PICK%"=="LST" SET "ERROR=1" @@ -803,9 +804,9 @@ IF "%PICK%"=="FMGS" SET "$FOLD=%FMGR_SOURCE%" IF NOT DEFINED $FOLD SET "ERROR=1"&&GOTO:PICK_ERROR IF NOT EXIST "%$FOLD%\%$ELECT$%" SET "ERROR=1"&&GOTO:PICK_ERROR IF DEFINED $MAKE CALL:PAD_LINE&&CALL:BOXT1&&ECHO.&&ECHO. Enter name of new list&&ECHO.&&CALL:BOXB1&&CALL:PAD_LINE&&CALL:PAD_PREV -IF DEFINED $MAKE SET /P "LIST_NAME=$>>" -IF DEFINED $MAKE IF NOT DEFINED LIST_NAME SET "ERROR=1"&&GOTO:PICK_ERROR -IF DEFINED $MAKE SET "$ELECT$=%LIST_NAME%.lst"&&ECHO.EXEC-LIST>"%$FOLD%\%LIST_NAME%.lst" +IF DEFINED $MAKE SET /P "$LIST_NAME=$>>" +IF DEFINED $MAKE IF NOT DEFINED $LIST_NAME SET "ERROR=1"&&GOTO:PICK_ERROR +IF DEFINED $MAKE SET "$ELECT$=%$LIST_NAME%.lst"&&ECHO.EXEC-LIST>"%$FOLD%\%$LIST_NAME%.lst" IF EXIST "%$FOLD%\%$ELECT$%" SET "$PICK=%$FOLD%\%$ELECT$%" FOR %%a in (LST MST) DO (IF "%PICK%"=="%%a" SET "HEAD_EXT=%%a"&&SET "HEAD_CHECK=%$PICK%"&&CALL:HEAD_CHECK) IF DEFINED ERROR CALL:PAUSED @@ -1035,7 +1036,7 @@ IF "%SELECT%"=="-" IF DEFINED SOURCE_LOCATION CALL:BOOT_IMPORT&&SET "SELECT=" GOTO:IMAGE_PROCESSING :IMAGEPROC_START SET "ERROR="&&SET "VHDX_MB=%VHDX_SIZE%"&&IF NOT "%PROG_MODE%"=="COMMAND" CLS -CALL:PAD_LINE&&CALL:BOXT2&&ECHO. %#@%IMAGE PROCESSING START:%#$% %DATE% %TIME%&&CALL:TITLECARD +CALL:BOXT2&&ECHO. %#@%IMAGE PROCESSING START:%#$% %DATE% %TIME%&&CALL:TITLECARD IF "%SOURCE_TYPE%"=="WIM" IF "%WIM_SOURCE%"=="SELECT" SET "ERROR=1"&&ECHO.&&ECHO. %XLR4%Source %SOURCE_TYPE% not set.%#$% IF "%SOURCE_TYPE%"=="PATH" IF "%PATH_SOURCE%"=="SELECT" SET "ERROR=1"&&ECHO.&&ECHO. %XLR4%Source %SOURCE_TYPE% not set.%#$% IF "%SOURCE_TYPE%"=="VHDX" IF "%VHDX_SOURCE%"=="SELECT" SET "ERROR=1"&&ECHO.&&ECHO. %XLR4%Source %SOURCE_TYPE% not set.%#$% @@ -1060,7 +1061,7 @@ IF "%SOURCE_TYPE%"=="VHDX" IF "%TARGET_TYPE%"=="WIM" CALL:VHDX2WIM IF "%SOURCE_TYPE%"=="WIM" IF "%TARGET_TYPE%"=="PATH" CALL:WIM2PATH IF "%SOURCE_TYPE%"=="PATH" IF "%TARGET_TYPE%"=="WIM" CALL:PATH2WIM :IMAGEPROC_CLEANUP -ECHO.&&ECHO. %#@%IMAGE PROCESSING END:%#$% %DATE% %TIME%&&CALL:BOXB2&&CALL:PAD_LINE&&IF NOT "%PROG_MODE%"=="COMMAND" CALL:PAUSED +ECHO.&&ECHO. %#@%IMAGE PROCESSING END:%#$% %DATE% %TIME%&&CALL:BOXB2&&IF NOT "%PROG_MODE%"=="COMMAND" CALL:PAUSED EXIT /B :BOOT_IMPORT IF EXIST "%BOOT_FOLDER%\boot.sav" CALL:PAD_LINE&&CALL:BOXT1&&ECHO.&&ECHO. File boot.sav already exists. Press (%##%X%#$%) to overwrite.&&ECHO.&&CALL:BOXB1&&CALL:PAD_LINE&&CALL:PAD_PREV&&CALL SET "PROMPT_SET=CONFIRM"&&CALL:PROMPT_SET @@ -1178,9 +1179,9 @@ IF DEFINED LIVE_APPLY IF NOT DEFINED DISCLAIMER CALL:DISCLAIMER IF DEFINED LIVE_APPLY IF NOT DEFINED DISCLAIMER EXIT /B IF NOT DEFINED LIVE_APPLY IF NOT DEFINED $PICK EXIT /B SET "VDISK=%$PICK%" -IF "%IMAGEMGR_RUN%"=="1" SET "PKX_SESSION=1"&&CALL:PKX_RUN -IF "%IMAGEMGR_RUN%"=="2" SET "LST_SESSION=1"&&CALL:LIST_RUN -SET "LST_SESSION="&&SET "PKX_SESSION=" +IF "%IMAGEMGR_RUN%"=="1" SET "CURR_SESSION=PACK"&&SET "PKX_SESSION=1"&&SET "VDISK_FLAG=1"&&CALL:PKX_RUN +IF "%IMAGEMGR_RUN%"=="2" SET "CURR_SESSION=EXEC"&&SET "LST_SESSION=1"&&SET "VDISK_FLAG=1"&&CALL:LIST_RUN +SET "CURR_SESSION="&&SET "LST_SESSION="&&SET "PKX_SESSION=" EXIT /B :LIST_EDIT IF NOT DEFINED $PICK EXIT /B @@ -1188,46 +1189,46 @@ START NOTEPAD "%$PICK%" EXIT /B :LIST_RUN SET "ERR_MSG="&&IF NOT DEFINED $RUN EXIT /B -IF DEFINED LST_SESSION IF DEFINED PKX_SESSION SET "DUAL_SESSION=1"&&ECHO. +FOR %%G in ("%$RUN%") DO SET "LIST_NAME=%%~nG%%~xG" +IF "%LIST_NAME%"=="$LST2" SET "LIST_NAME=multi.lst" +IF DEFINED LST_SESSION IF DEFINED PKX_SESSION SET "DUAL_SESSION=1" IF NOT "%PROG_MODE%"=="COMMAND" IF NOT DEFINED DUAL_SESSION CLS IF NOT DEFINED LIST_ITEMS1 CALL:LIST_ITEMS IF NOT DEFINED SAFE_EXCLUDE SET "SAFE_EXCLUDE=ENABLED" -IF NOT DEFINED DUAL_SESSION CALL:PAD_LINE&&CALL:BOXT2 -IF DEFINED PKX_SESSION ECHO. %#@%PKX-LIST START:%#$% %DATE% %TIME% -IF NOT DEFINED PKX_SESSION ECHO. %#@%EXEC-LIST START:%#$% %DATE% %TIME% -ECHO.&&SET "HEAD_EXT=LST"&&SET "HEAD_CHECK=%$RUN%"&&CALL:HEAD_CHECK +CALL:BOXT2&&ECHO. %#@%%CURR_SESSION%-LIST START:%#$% %DATE% %TIME%&&ECHO. +SET "HEAD_EXT=LST"&&SET "HEAD_CHECK=%$RUN%"&&CALL:HEAD_CHECK IF NOT "%$HEAD%"=="EXEC-LIST" ECHO.&&ECHO. ERROR: Bad file header, not an execution list.&&ECHO.&&GOTO:LIST_RUN_END IF DEFINED ERROR CALL:PAUSED&GOTO:LIST_RUN_END COPY /Y "%$RUN%" "$RUN">NUL 2>&1 -IF DEFINED DUAL_SESSION GOTO:LIST_RUN_JUMP -IF "%BRUTE_FORCE%"=="ENABLED" IF "%PROG_MODE%"=="RAMDISK" SET "BRUTE_FORCE="&&SET "BRUTE_FLG=1" -IF "%BRUTE_FORCE%"=="ENABLED" SC DELETE $BRUTE>NUL 2>&1 -IF "%BRUTE_FORCE%"=="ENABLED" SC CREATE $BRUTE BINPATH="CMD /C START "%PROG_SOURCE%\$BRUTE.CMD"" START=DEMAND>NUL 2>&1 -IF DEFINED MULTI_LIST GOTO:LIST_RUN_JUMP +IF DEFINED DUAL_SESSION IF DEFINED VDISK_ATTACHED GOTO:LIST_RUN_JUMP +IF "%CURR_SESSION%"=="MULTI" GOTO:LIST_RUN_JUMP IF DEFINED LIVE_APPLY ECHO. Using live system as target. -IF NOT DEFINED LIVE_APPLY SET "VDISK_LTR=ANY"&&CALL:VDISK_ATTACH -IF NOT DEFINED LIVE_APPLY IF NOT "%VDISK_SYS%"=="1" SET "ERR_MSG= %XLR4%Vdisk error or Windows is not installed on Vdisk.%#$%"&&GOTO:LIST_RUN_CLEANUP +IF DEFINED VDISK_FLAG SET "VDISK_LTR=ANY"&CALL:MOUNT_INT&CALL:VDISK_ATTACH +IF NOT DEFINED LIVE_APPLY IF NOT EXIST "%VDISK_LTR%:\" SET "ERR_MSG= %XLR4%Vdisk error or Windows is not installed on Vdisk.%#$%"&&GOTO:LIST_RUN_CLEANUP :LIST_RUN_JUMP CALL:VAR_CLEAR&&FOR /F "TOKENS=1-9 SKIP=1 DELIMS=[]" %%a in ($RUN) DO (FOR %%$ in (%LIST_ITEMS1% %LIST_ITEMS2%) DO (FOR %%X in (DRIVER COMMAND COMMANDQ) DO (IF "%%X"=="%%$" IF "%%$"=="%%a" CALL:MOUNT_CLEAR) IF "%%$"=="%%a" CALL SET "LIST_ITEM=%%a"&&CALL SET "BASE_MEAT=%%b"&&CALL SET "LIST_ACTN=%%c"&&CALL SET "LIST_TIME=%%d"&&CALL SET "LIST_CLM5=%%e"&&CALL:UNIFIED_PARSE)) -IF DEFINED DUAL_SESSION GOTO:LIST_RUN_END CALL:VAR_CLEAR IF "%BRUTE_FORCE%"=="ENABLED" SC DELETE $BRUTE>NUL 2>&1 -IF DEFINED BRUTE_FLG SET "BRUTE_FLG="&&SET "BRUTE_FORCE=ENABLED" IF EXIST "%PROG_SOURCE%\$BRUTE.CMD" DEL /Q /F "%PROG_SOURCE%\$BRUTE.CMD">NUL 2>&1 -rem IF EXIST "$QRY" DEL /Q /F "$QRY">NUL 2>&1 :LIST_RUN_CLEANUP IF DEFINED ERR_MSG ECHO.&&ECHO.%ERR_MSG%&&ECHO. -IF DEFINED MULTI_LIST IF "%VDISK_ATTACHED%"=="1" CALL:MOUNT_INT&CALL:VDISK_DETACH -IF NOT DEFINED MULTI_LIST IF NOT DEFINED LIVE_APPLY CALL:MOUNT_INT&CALL:VDISK_DETACH +REM ECHO. [VDF=%VDISK_FLAG%] [CUR=%CURR_SESSION%] [DUAL=%DUAL_SESSION%] [MLT=%MLT_SESSION%] [PKX=%PKX_SESSION%] [LST=%LST_SESSION%] +IF "%CURR_SESSION%"=="PACK" IF DEFINED DUAL_SESSION IF DEFINED VDISK_FLAG GOTO:LIST_RUN_END +REM IF "%CURR_SESSION%"=="PACK" IF DEFINED DUAL_SESSION IF DEFINED MLT_SESSION IF DEFINED VDISK_FLAG GOTO:LIST_RUN_END +IF "%CURR_SESSION%"=="MULTI" IF NOT DEFINED DUAL_SESSION IF DEFINED MLT_SESSION IF NOT DEFINED PKX_SESSION CALL:MOUNT_INT&CALL:VDISK_DETACH +IF DEFINED VDISK_FLAG CALL:MOUNT_INT&CALL:VDISK_DETACH :LIST_RUN_END -ECHO.&&IF NOT DEFINED DUAL_SESSION FOR %%a in (DRIVER_QRY SC_PREPARE RO_PREPARE VDISK_ATTACHED) DO (SET "%%a=") -IF DEFINED PKX_SESSION ECHO. %#@%PKX-LIST END:%#$% %DATE% %TIME% -IF NOT DEFINED PKX_SESSION ECHO. %#@%EXEC-LIST END:%#$% %DATE% %TIME%&&CALL:CLEAN -IF DEFINED DUAL_SESSION ECHO. -IF NOT DEFINED DUAL_SESSION CALL:BOXB2&&CALL:PAD_LINE&&CALL:MOUNT_INT&&CALL:SCRATCH_DELETE&&IF NOT "%PROG_MODE%"=="COMMAND" CALL:PAUSED +IF NOT DEFINED DUAL_SESSION FOR %%a in (DRIVER_QRY SC_PREPARE RO_PREPARE) DO (SET "%%a=") +ECHO.&&ECHO. %#@%%CURR_SESSION%-LIST END:%#$% %DATE% %TIME%&&CALL:BOXB2 +IF NOT DEFINED PKX_SESSION CALL:CLEAN +IF NOT DEFINED DUAL_SESSION CALL:MOUNT_INT&&CALL:SCRATCH_DELETE&&IF NOT "%PROG_MODE%"=="COMMAND" CALL:PAUSED FOR %%a in (DUAL_SESSION ERR_MSG LIST_ITEMS1 LIST_ITEMS2 $RUN LIST_ITEM LIST_TIME LIST_ACTN BASE_MEAT LIST_CLM5) DO (SET "%%a=") EXIT /B +:BRUTE_CHK +FOR /F "TOKENS=2 DELIMS= " %%a IN ('REG QUERY "HKLM\SYSTEM\ControlSet001\SERVICES\$BRUTE" 2^>NUL') DO (IF "%%a"=="REG_SZ" EXIT /B) +SC CREATE $BRUTE BINPATH="CMD /C START "%PROG_SOURCE%\$BRUTE.CMD"" START=DEMAND>NUL 2>&1 +EXIT /B :UNIFIED_PARSE FOR %%a in (COMMAND COMMANDQ DRIVER) DO (IF "%%a"=="%LIST_ITEM%" CALL:MOUNT_REST) IF DEFINED $HALT IF NOT DEFINED $HALTX SET "$HALTX=1"&&ECHO. ERROR: HALTED. @@ -1244,7 +1245,7 @@ IF "%LIST_ITEM%:%LIST_TIME%"=="SERVICE:IA" CALL:SVC_ITEM IF "%LIST_ITEM%:%LIST_TIME%"=="TASK:IA" CALL:TASK_ITEM IF "%LIST_ITEM%:%LIST_TIME%"=="DISM:IA" IF NOT "%LIST_ACTN%"=="" SET "DISM_OPER=%BASE_MEAT%"&&CALL:DISM_ITEM IF "%LIST_ITEM%:%LIST_TIME%"=="EXTPACKAGE:IA" CALL SET "EXTPACKAGE=%PACK_FOLDER%\%BASE_MEAT%"&&CALL:PACK_ITEM -IF "%LIST_ITEM%"=="PICK" IF DEFINED MULTI_LIST IF NOT DEFINED PKX_SESSION CALL:PICK_ITEM +IF "%LIST_ITEM%"=="PICK" IF DEFINED MLT_SESSION IF NOT DEFINED PKX_SESSION CALL:PICK_ITEM FOR %%a in (SC RO) DO (IF "%%a"=="%LIST_TIME%" CALL:SC_RO_CREATE) IF EXIST "$*" CALL:CLEAN EXIT /B @@ -1266,10 +1267,13 @@ IF "%LIST_ACTN%"=="CMD" SET "MOUNT_SAVE=%MOUNT%"&&SET "MOUNT="&&FOR %%a in (HIVE IF "%LIST_ITEM%"=="COMMAND" CALL ECHO.Executing command %#@%%BASE_MEAT%%#$%... IF "%LIST_ACTN%"=="CMD" CALL CMD.EXE /C %BASE_MEAT% IF "%LIST_ACTN%"=="CMD" SET "MOUNT=%MOUNT_SAVE%"&&SET "MOUNT_SAVE="&&SET "HIVE_SOFTWARE=%HIVE_SOFTWARE_X%"&&SET "HIVE_SYSTEM=%HIVE_SYSTEM_X%"&&SET "HIVE_USER=%HIVE_USER_X%"&&FOR %%a in (HIVE_SOFTWARE HIVE_SYSTEM HIVE_USER) DO (SET "%%a_X=") +IF "%LIST_ACTN%"=="REG" IF "%BRUTE_FORCE%"=="ENABLED" IF "%WINPE_BOOT%"=="1" SET "BRUTE_FORCE=DISABLED"&&SET "BRUTE_FLAG=1" +IF "%LIST_ACTN%"=="REG" IF "%BRUTE_FORCE%"=="ENABLED" CALL:BRUTE_CHK IF "%LIST_ACTN%"=="REG" IF "%BRUTE_FORCE%"=="ENABLED" CALL ECHO.CMD.EXE /C %BASE_MEAT% >"%PROG_SOURCE%\$BRUTE.CMD" IF "%LIST_ACTN%"=="REG" IF "%BRUTE_FORCE%"=="ENABLED" ECHO.EXIT>>"%PROG_SOURCE%\$BRUTE.CMD" IF "%LIST_ACTN%"=="REG" IF "%BRUTE_FORCE%"=="ENABLED" SC START $BRUTE>NUL 2>&1 IF "%LIST_ACTN%"=="REG" IF NOT "%BRUTE_FORCE%"=="ENABLED" CALL CMD.EXE /C %BASE_MEAT% +IF DEFINED BRUTE_FLAG SET "BRUTE_FLAG="&&SET "BRUTE_FORCE=ENABLED" IF NOT DEFINED PKX_SESSION CD /D "%PROG_FOLDER%">NUL IF DEFINED PKX_SESSION CD /D "%PKX_FOLDER%">NUL EXIT /B @@ -1279,8 +1283,9 @@ IF NOT EXIST "%EXTPACKAGE%" ECHO. %XLR4%%EXTPACKAGE% doesn't exist.%#$%&&EXIT /B SET "PACK_GOOD=The operation completed successfully"&&SET "PACK_BAD=The operation did not complete successfully" FOR %%G in ("%EXTPACKAGE%") DO SET "PACKFULL=%%~nG%%~xG"&&SET "PACKEXT=%%~xG" FOR %%G in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO (CALL SET "PACKEXT=%%PACKEXT:%%G=%%G%%") +IF "%PACKEXT%"==".PKX" IF EXIST "%PROG_SOURCE%\ScratchPKX" ECHO. %XLR2%ERROR: %PACKFULL% - %PKX_NAME% is already in session. Abort.%#$%&&EXIT /B IF "%PACKEXT%"==".PKX" IF DEFINED PKX_SESSION ECHO. %XLR2%ERROR: %PACKFULL% - %PKX_NAME% is already in session. Abort.%#$%&&EXIT /B -IF "%PACKEXT%"==".PKX" IF NOT DEFINED PKX_SESSION SET "PKX_SESSION=1"&&SET "PKX_PACK=%EXTPACKAGE%"&&GOTO:PKX_RUN +IF "%PACKEXT%"==".PKX" SET "PKX_SESSION=1"&&SET "PKX_PACK=%EXTPACKAGE%"&&GOTO:PKX_RUN FOR %%G in (APPXBUNDLE MSIXBUNDLE) DO (IF "%PACKEXT%"==".%%G" SET "PACKEXT=.APPX") ECHO.Installing %#@%%PACKFULL%%#$%...&&CALL:IF_LIVE_MIX IF "%PACKEXT%"==".APPX" SET "DISMSG="&&FOR /F "TOKENS=1 DELIMS=." %%1 in ('DISM /ENGLISH /%APPLY_TARGET% /NORESTART /ADD-PROVISIONEDAPPXPACKAGE /PACKAGEPATH:"%EXTPACKAGE%" 2^>NUL') DO (IF "%%1"=="%PACK_GOOD%" CALL SET "DISMSG=%PACK_GOOD%"&&CALL ECHO. %XLR5%%PACK_GOOD%.%#$%&&EXIT /B) @@ -1292,15 +1297,14 @@ IF "%PACKEXT%"==".MSU" SET "DISMSG="&&FOR /F "TOKENS=1 DELIMS=." %%1 in ('DISM / IF "%PACKEXT%"==".MSU" CALL ECHO. %XLR2%%PACK_BAD%.%#$%&&EXIT /B EXIT /B :PKX_RUN -IF EXIST "%PROG_SOURCE%\ScratchPKX" CALL:PKX_DELETE SET "PKX_FOLDER=%PROG_SOURCE%\ScratchPKX"&&MD "%PROG_SOURCE%\ScratchPKX">NUL 2>&1 FOR %%G in ("%PKX_PACK%") DO (SET "PKX_NAME=%%~nG%%~xG") -ECHO. Extracting %#@%%PKX_NAME%%#$%... -SET "LIST_FOLDER_Z=%LIST_FOLDER%"&&SET "PACK_FOLDER_Z=%PACK_FOLDER%"&&SET "CACHE_FOLDER_Z=%CACHE_FOLDER%"&&DISM /ENGLISH /APPLY-IMAGE /IMAGEFILE:"%PKX_PACK%" /INDEX:1 /APPLYDIR:"%PKX_FOLDER%">NUL 2>&1 +ECHO.Extracting %#@%%PKX_NAME%%#$%... +SET "LAST_SESSION=%CURR_SESSION%"&&SET "LIST_FOLDER_Z=%LIST_FOLDER%"&&SET "PACK_FOLDER_Z=%PACK_FOLDER%"&&SET "CACHE_FOLDER_Z=%CACHE_FOLDER%"&&DISM /ENGLISH /APPLY-IMAGE /IMAGEFILE:"%PKX_PACK%" /INDEX:1 /APPLYDIR:"%PKX_FOLDER%">NUL 2>&1 IF EXIST "%PKX_FOLDER%\package.lst" CD /D "%PKX_FOLDER%">NUL IF NOT EXIST "%PKX_FOLDER%\package.lst" ECHO. %XLR2%ERROR: Package is either missing package.lst or unable to extract.%#$% -SET "LIST_FOLDER=%PKX_FOLDER%"&&SET "PACK_FOLDER=%PKX_FOLDER%"&&SET "CACHE_FOLDER=%PKX_FOLDER%"&&IF EXIST "%PKX_FOLDER%\package.lst" SET "$RUN=%PKX_FOLDER%\package.lst"&&CALL:LIST_RUN -SET "LIST_FOLDER=%LIST_FOLDER_Z%"&&SET "PACK_FOLDER=%PACK_FOLDER_Z%"&&SET "CACHE_FOLDER=%CACHE_FOLDER_Z%"&&CD /D "%PROG_FOLDER%">NUL +SET "CURR_SESSION=PACK"&&SET "LIST_FOLDER=%PKX_FOLDER%"&&SET "PACK_FOLDER=%PKX_FOLDER%"&&SET "CACHE_FOLDER=%PKX_FOLDER%"&&IF EXIST "%PKX_FOLDER%\package.lst" SET "$RUN=%PKX_FOLDER%\package.lst"&&CALL:LIST_RUN +SET "CURR_SESSION=%LAST_SESSION%"&&SET "LIST_FOLDER=%LIST_FOLDER_Z%"&&SET "PACK_FOLDER=%PACK_FOLDER_Z%"&&SET "CACHE_FOLDER=%CACHE_FOLDER_Z%"&&CD /D "%PROG_FOLDER%">NUL SET "LIST_FOLDER_Z="&&SET "PACK_FOLDER_Z="&&SET "CACHE_FOLDER_Z="&&SET "PKX_SESSION="&&SET "PKX_PACK="&&SET "PKX_FOLDER="&&SET "PKX_NAME="&&IF EXIST "%PROG_SOURCE%\ScratchPKX" CALL:PKX_DELETE EXIT /B :PKX_DELETE @@ -1364,13 +1368,16 @@ SET "X0Z=%BASE_MEAT%"&&SET "REGMSG=" IF "%SVC_XNT%"=="1" IF "%X1%"=="ERROR" SET "REGMSG=%XLR4%Service %BASE_MEAT% doesn't exist.%#$%" IF "%SVC_XNT%"=="1" IF "%X1%"=="End of search" SET "REGMSG=%XLR4%Service %BASE_MEAT% doesn't exist.%#$%" IF DEFINED REGMSG EXIT /B +IF "%BRUTE_FORCE%"=="ENABLED" IF "%WINPE_BOOT%"=="1" SET "BRUTE_FORCE=DISABLED"&&SET "BRUTE_FLAG=1" SET SVC_CMD1=REG DELETE "%X1%" /F&&SET SVC_CMD2=REG ADD "%X1%" /V "ImagePath" /T REG_EXPAND_SZ /D "NUL" /F IF NOT "%BRUTE_FORCE%"=="ENABLED" %SVC_CMD1%>NUL 2>&1 IF NOT "%BRUTE_FORCE%"=="ENABLED" %SVC_CMD2%>NUL 2>&1 +IF "%BRUTE_FORCE%"=="ENABLED" CALL:BRUTE_CHK IF "%BRUTE_FORCE%"=="ENABLED" ECHO.%SVC_CMD1%>"%PROG_SOURCE%\$BRUTE.CMD" IF "%BRUTE_FORCE%"=="ENABLED" ECHO.%SVC_CMD2%>>"%PROG_SOURCE%\$BRUTE.CMD" IF "%BRUTE_FORCE%"=="ENABLED" ECHO.EXIT>>"%PROG_SOURCE%\$BRUTE.CMD" IF "%BRUTE_FORCE%"=="ENABLED" SC START $BRUTE>NUL 2>&1 +IF DEFINED BRUTE_FLAG SET "BRUTE_FLAG="&&SET "BRUTE_FORCE=ENABLED" EXIT /B :TASK_ITEM IF NOT "%LIST_ACTN%"=="DELETE" ECHO. %XLR4%ERROR: Task list action is not delete.%#$%&&EXIT /B @@ -1392,15 +1399,18 @@ SET "REGMSG="&&IF NOT "%BASE_MEAT%"=="%X0Z%" SET "X0Z=%BASE_MEAT%" IF "%TASK_XNT%"=="1" IF "%X1%"=="ERROR" SET "REGMSG=%XLR4%Task %BASE_MEAT% doesn't exist.%#$%" IF "%TASK_XNT%"=="1" IF "%X1%"=="End of search" SET "REGMSG=%XLR4%Task %BASE_MEAT% doesn't exist.%#$%" IF DEFINED REGMSG EXIT /B +IF "%BRUTE_FORCE%"=="ENABLED" IF "%WINPE_BOOT%"=="1" SET "BRUTE_FORCE=DISABLED"&&SET "BRUTE_FLAG=1" SET TASK_CMD1=REG DELETE "%X1%" /F&&SET TASK_CMD2=REG DELETE "%HIVE_SOFTWARE%\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{%X2%}" /F IF NOT "%BRUTE_FORCE%"=="ENABLED" IF NOT "%X1%"==" Id REG_SZ " %TASK_CMD1%>NUL 2>&1 IF NOT "%BRUTE_FORCE%"=="ENABLED" IF "%X1%"==" Id REG_SZ " %TASK_CMD2%>NUL 2>&1 IF NOT "%BRUTE_FORCE%"=="ENABLED" DEL /F "%WINTAR%\System32\Tasks\%BASE_MEAT%">NUL 2>&1 +IF "%BRUTE_FORCE%"=="ENABLED" CALL:BRUTE_CHK IF "%BRUTE_FORCE%"=="ENABLED" IF NOT "%X1%"==" Id REG_SZ " ECHO.%TASK_CMD1%>"%PROG_SOURCE%\$BRUTE.CMD" IF "%BRUTE_FORCE%"=="ENABLED" IF "%X1%"==" Id REG_SZ " ECHO.%TASK_CMD2%>>"%PROG_SOURCE%\$BRUTE.CMD" IF "%BRUTE_FORCE%"=="ENABLED" ECHO.DEL /F "%WINTAR%\System32\Tasks\%BASE_MEAT%">>"%PROG_SOURCE%\$BRUTE.CMD" IF "%BRUTE_FORCE%"=="ENABLED" ECHO.EXIT>>"%PROG_SOURCE%\$BRUTE.CMD" IF "%BRUTE_FORCE%"=="ENABLED" SC START $BRUTE>NUL 2>&1 +IF DEFINED BRUTE_FLAG SET "BRUTE_FLAG="&&SET "BRUTE_FORCE=ENABLED" EXIT /B :APPX_ITEM IF NOT "%LIST_ACTN%"=="DELETE" ECHO. %XLR4%ERROR: Appx list action is not delete.%#$%&&EXIT /B @@ -1615,11 +1625,10 @@ IF DEFINED ERROR EXIT /B CALL:PAD_MULT&&CALL:PAD_PREV&&CALL:MENU_SELECT IF NOT DEFINED SELECT EXIT /B ECHO.&&ECHO. Parsing results...&© /Y "%$LISTX%" "$HZ">NUL -IF "%$HEAD%"=="MULTI-LIST" SET "MULTI_LIST=1"&&ECHO.EXEC-LIST>"$LST2" +IF "%$HEAD%"=="MULTI-LIST" SET "MLT_SESSION=1"&&ECHO.EXEC-LIST>"$LST2" FOR %%a in (%$ELECT%) DO (IF NOT "%%a"=="" CALL SET "FULL_TARGET=%%$ITEM%%a%%"&&CALL:GROUP_POPULATE) IF "%$HEAD%"=="BASE-GROUP" SET "MENUT0= %#@%AVAILABLE LSTs:%#$%"&&SET "MENUT1= "&&SET "MENUT2= ( %##%0%#$% ) Create new list"&&SET "MENUB0= "&&SET "PICK=LST"&&CALL:FILE_PICK -IF DEFINED MULTI_LIST SET "$RUN=%PROG_FOLDER%\$LST2"&&SET "LST_SESSION=1"&&SET "LIVE_APPLY=1"&&CALL:LIST_RUN -IF DEFINED MULTI_LIST SET "MULTI_LIST="&&SET "LST_SESSION="&&EXIT /B +IF DEFINED MLT_SESSION SET "$RUN=%PROG_FOLDER%\$LST2"&&SET "CURR_SESSION=MULTI"&&SET "LST_SESSION=1"&&SET "LIVE_APPLY=1"&&CALL:LIST_RUN&SET "CURR_SESSION="&SET "MLT_SESSION="&SET "LST_SESSION="&SET "PKX_SESSION="&EXIT /B IF NOT DEFINED $PICK EXIT /B CALL:PAD_ADD&&SET "COMBINE_HEAD=EXEC-LIST"&&SET "$LST1=%$PICK%"&&CALL:LIST_COMBINE SET "NLIST_TMP="&&CALL:PAD_END&&CALL:PAUSED @@ -1828,7 +1837,7 @@ IF DEFINED LIVE_APPLY IF NOT DEFINED DISCLAIMER EXIT /B IF NOT DEFINED LIVE_APPLY IF NOT DEFINED $PICK EXIT /B CALL:PAD_LINE&&CALL:BOXT1&&ECHO.&&ECHO. Enter name of new base list&&ECHO.&&CALL:BOXB1&&CALL:PAD_LINE&&SET "PROMPT_SET=NEW_NAME"&&SET "PROMPT_ANY=1"&&CALL:PROMPT_SET IF NOT DEFINED NEW_NAME EXIT /B -CLS&&CALL:PAD_LINE&&CALL:BOXT2&&ECHO. %#@%BASE-LIST CREATION START:%#$% %DATE% %TIME%&&ECHO. +CLS&&CALL:BOXT2&&ECHO. %#@%BASE-LIST CREATION START:%#$% %DATE% %TIME%&&ECHO. IF NOT DEFINED LIVE_APPLY SET "VDISK=%$PICK%"&&SET "VDISK_LTR=ANY"&&CALL:VDISK_ATTACH IF NOT DEFINED LIVE_APPLY IF NOT "%VDISK_SYS%"=="1" ECHO.&&ECHO. %##%Vdisk error or Windows not installed on Vdisk.%#$%&&ECHO.&&CALL:VDISK_DETACH&&GOTO:LIST_BASE_CLEANUP ECHO. %#@%GETTING VERSION%#$%..&&ECHO.&&SET "BASEPRE="&&SET "BASEPRELST="&&CALL:IF_LIVE_MIX @@ -1867,7 +1876,7 @@ IF NOT DEFINED DRIVER_NAME ECHO. No 3rd party drivers installed. CALL:MOUNT_INT IF NOT DEFINED LIVE_APPLY CALL:VDISK_DETACH :LIST_BASE_CLEANUP -CALL:SCRATCH_DELETE&&ECHO.&&ECHO. %#@%BASE-LIST CREATION END:%#$% %DATE% %TIME%&&CALL:BOXB2&&CALL:PAD_LINE&&CALL:CLEAN&&CALL:PAUSED +CALL:SCRATCH_DELETE&&ECHO.&&ECHO. %#@%BASE-LIST CREATION END:%#$% %DATE% %TIME%&&CALL:BOXB2&&CALL:CLEAN&&CALL:PAUSED EXIT /B :BASE_WRITE IF DEFINED BASEPRE IF DEFINED BASEPRELST IF "%BASEPRELST%"=="%BASEPRE%" EXIT /B @@ -1996,14 +2005,14 @@ IF NOT EXIST "%MAKER_FOLDER%\*" SET "EDIT_SKIP=1"&&CALL:PROJ_NEW IF DEFINED ERROR EXIT /B SET "ERR_MSG="&&SET "MENUT0= %#@%AVAILABLE VHDXs:%#$%"&&SET "MENUT1= "&&SET "MENUT2= ( %##%@%#$% ) %##%Current-Environment%#$%"&&SET "MENUB0= "&&SET "PICK=VHDX"&&CALL:FILE_PICK IF NOT DEFINED LIVE_APPLY IF NOT DEFINED $PICK EXIT /B -CLS&&CALL:PAD_LINE&&CALL:BOXT2&&ECHO. %#@%DRIVER-EXPORT START:%#$% %DATE% %TIME%&&ECHO. +CLS&&CALL:BOXT2&&ECHO. %#@%DRIVER-EXPORT START:%#$% %DATE% %TIME%&&ECHO. IF DEFINED LIVE_APPLY ECHO. Using live system for driver export. IF NOT DEFINED LIVE_APPLY SET "VDISK=%$PICK%"&&CALL:VDISK_ATTACH CALL:IF_LIVE_MIX IF NOT EXIST "%MAKER_FOLDER%\driver" MD "%MAKER_FOLDER%\driver">NUL 2>&1 IF EXIST "%MAKER_FOLDER%\driver" DISM /ENGLISH /%APPLY_TARGET% /EXPORT-DRIVER /destination:"%MAKER_FOLDER%\driver" IF NOT DEFINED LIVE_APPLY CALL:VDISK_DETACH -ECHO.&&ECHO. %#@%DRIVER-EXPORT END:%#$% %DATE% %TIME%&&CALL:BOXB2&&CALL:PAD_LINE&&CALL:PAUSED +ECHO.&&ECHO. %#@%DRIVER-EXPORT END:%#$% %DATE% %TIME%&&CALL:BOXB2&&CALL:PAUSED EXIT /B :PROJ_EDIT FOR %%a in (package.cmd package.lst) DO (IF EXIST "%MAKER_FOLDER%\%%a" START NOTEPAD.EXE "%MAKER_FOLDER%\%%a") @@ -2012,17 +2021,17 @@ EXIT /B IF NOT DEFINED $PICK EXIT /B CALL:PROJ_CLEAR IF DEFINED ERROR EXIT /B -CLS&&CALL:PAD_LINE&&CALL:BOXT2&&ECHO. %#@%PACKAGE RESTORE START:%#$% %DATE% %TIME% +CLS&&CALL:BOXT2&&ECHO. %#@%PACKAGE RESTORE START:%#$% %DATE% %TIME% DISM /ENGLISH /APPLY-IMAGE /IMAGEFILE:"%$PICK%" /INDEX:1 /APPLYDIR:"%MAKER_FOLDER%" -ECHO.&&ECHO. %#@%PACKAGE RESTORE END:%#$% %DATE% %TIME%&&CALL:BOXB2&&CALL:PAD_LINE&&CALL:PAUSED +ECHO.&&ECHO. %#@%PACKAGE RESTORE END:%#$% %DATE% %TIME%&&CALL:BOXB2&&CALL:PAUSED EXIT /B :PROJ_CREATE CALL:PAD_LINE&&CALL:BOXT1&&ECHO.&&IF NOT EXIST "%MAKER_FOLDER%\*" ECHO. %XLR2%ERROR: Package folder is empty.%#$%&&ECHO.&&CALL:BOXB1&&CALL:PAD_LINE&&CALL:PAUSED&EXIT /B ECHO. Enter new package %#@%.PKX%#$% name&&ECHO.&&CALL:BOXB1&&CALL:PAD_LINE&&SET "PROMPT_SET=PACKNAME"&&SET "PROMPT_ANY=1"&&CALL:PAD_PREV&&CALL:PROMPT_SET IF NOT DEFINED PACKNAME EXIT /B -SET "ERROR="&&CLS&&CALL:PAD_LINE&&CALL:BOXT2&&ECHO. %#@%PACKAGE CREATE START:%#$% %DATE% %TIME% +SET "ERROR="&&CLS&&CALL:BOXT2&&ECHO. %#@%PACKAGE CREATE START:%#$% %DATE% %TIME% DISM /ENGLISH /CAPTURE-IMAGE /CAPTUREDIR:"%MAKER_FOLDER%" /IMAGEFILE:"%PACK_FOLDER%\%PACKNAME%.pkx" /COMPRESS:%PROJ_XLVL% /NAME:"PKX" /CheckIntegrity /Verify -ECHO.&&ECHO. %#@%PACKAGE CREATE END:%#$% %DATE% %TIME%&&CALL:BOXB2&&CALL:PAD_LINE&&CALL:PAUSED +ECHO.&&ECHO. %#@%PACKAGE CREATE END:%#$% %DATE% %TIME%&&CALL:BOXB2&&CALL:PAUSED EXIT /B :PROJ_XLVL IF "%PROJ_XLVL%"=="FAST" SET "PROJ_XLVL=MAX"&&EXIT /B @@ -2309,6 +2318,7 @@ ECHO. Mounting vdisk %VHDX_123% letter %VDISK_LTR%...&&SET "VHDX_123=" IF NOT DEFINED VHDX_MB SET "VHDX_MB=25600" (ECHO.create vdisk file="%VDISK%" maximum=%VHDX_MB% type=expandable&&ECHO.select vdisk file="%VDISK%"&&ECHO.attach vdisk&&ECHO.create partition primary&&ECHO.select partition 1&&ECHO.format fs=ntfs quick&&ECHO.assign letter=%VDISK_LTR% noerr&&ECHO.Exit)>"$DSK"&&DISKPART /s "$DSK">NUL 2>&1 SET "VHDX_MB="&&IF EXIST "$DSK*" DEL /Q /F "$DSK*">NUL 2>&1 +IF EXIST "%VDISK_LTR%:\" SET "VDISK_ATTACHED=1" EXIT /B :VDISK_ATTACH IF NOT DEFINED VDISK EXIT /B @@ -2318,7 +2328,7 @@ FOR %%G in ("%VDISK%") DO (SET "VHDX_123=%%~nG%%~xG") ECHO. Mounting vdisk %VHDX_123% letter %VDISK_LTR%...&&SET "VHDX_123=" SET "VDISK_SYS="&&(ECHO.Select vdisk file="%VDISK%"&&ECHO.attach vdisk&&ECHO.list vdisk&&ECHO.Exit)>"$DSK" FOR /F "TOKENS=1-8* DELIMS=* " %%a IN ('DISKPART /s "$DSK"') DO (SET "DISK_NUM="&&IF "%%a"=="VDisk" IF EXIST "%%i" SET "DISK_NUM=%%d"&&SET "CAPS_SET=VDISK_QRY"&&SET "CAPS_VAR=%%i"&&CALL:CAPS_SET&&CALL:VDISK_CAPS) -IF EXIST "%VDISK_LTR%:\WINDOWS" SET "VDISK_SYS=1" +IF EXIST "%VDISK_LTR%:\" SET "VDISK_ATTACHED=1"&&IF EXIST "%VDISK_LTR%:\WINDOWS" SET "VDISK_SYS=1" SET "VDISK_PART="&&SET "VDISK_QRY="&&SET "DISK_NUM="&&IF EXIST "$DSK*" DEL /Q /F "$DSK*">NUL 2>&1 EXIT /B :VDISK_CAPS @@ -2332,6 +2342,7 @@ IF NOT DEFINED VDISK EXIT /B FOR %%G in ("%VDISK%") DO (SET "VHDX_123=%%~nG%%~xG") ECHO. Unmounting vdisk %VHDX_123% letter %VDISK_LTR%...&&SET "VHDX_123=" (ECHO.Select vdisk file="%VDISK%"&&ECHO.Detach vdisk&&ECHO.Exit)>"$DSK"&&DISKPART /s "$DSK">NUL 2>&1 +IF NOT EXIST "%VDISK_LTR%:\" SET "VDISK_ATTACHED=" IF EXIST "$DSK*" DEL /Q /F "$DSK*">NUL 2>&1 EXIT /B :VDISK_COMPACT @@ -2588,11 +2599,11 @@ CLS&&IF EXIST "%BOOT_FOLDER%\boot.sdi" CALL:PAD_LINE&&CALL:BOXT1&&ECHO.&&ECHO. IF EXIST "%BOOT_FOLDER%\boot.sdi" IF NOT "%CONFIRM%"=="X" EXIT /B IF EXIST "%BOOT_FOLDER%\bootmgfw.efi" CALL:PAD_LINE&&CALL:BOXT1&&ECHO.&&ECHO. File bootmgfw.efi already exists. Press (%##%X%#$%) to overwrite&&ECHO.&&CALL:BOXB1&&CALL:PAD_LINE&&CALL:PAD_PREV&&CALL SET "PROMPT_SET=CONFIRM"&&CALL:PROMPT_SET IF EXIST "%BOOT_FOLDER%\bootmgfw.efi" IF NOT "%CONFIRM%"=="X" EXIT /B -CLS&&CALL:PAD_LINE&&CALL:BOXT2&&ECHO. %#@%EFI EXPORT START:%#$% %DATE% %TIME%&&ECHO.&&CALL:VTEMP_CREATE&&ECHO. Extracting boot-media. Using boot.sav located in folder... +CLS&&CALL:BOXT2&&ECHO. %#@%EFI EXPORT START:%#$% %DATE% %TIME%&&ECHO.&&CALL:VTEMP_CREATE&&ECHO. Extracting boot-media. Using boot.sav located in folder... SET "IMAGEFILE=%BOOT_FOLDER%\boot.sav"&&SET "INDEX_WORD=Setup"&&CALL:FIND_INDEX&&SET "IMAGEFILE=%BOOT_FOLDER%\boot.sav"&&CALL:APPLY_IMAGE IF EXIST "%APPLYDIR%\Windows\Boot\DVD\EFI\boot.sdi" ECHO. File boot.sdi was found. Copying to folder.&© /Y "%APPLYDIR%\Windows\Boot\DVD\EFI\boot.sdi" "%BOOT_FOLDER%">NUL 2>&1 IF EXIST "%APPLYDIR%\Windows\Boot\EFI\bootmgfw.efi" ECHO. File bootmgfw.efi was found. Copying to folder.&© /Y "%APPLYDIR%\Windows\Boot\EFI\bootmgfw.efi" "%BOOT_FOLDER%">NUL 2>&1 -CALL:VTEMP_DELETE&&ECHO.&&ECHO. %#@%EFI EXPORT END:%#$% %DATE% %TIME%&&CALL:BOXB2&&CALL:PAD_LINE&&CALL:PAUSED +CALL:VTEMP_DELETE&&ECHO.&&ECHO. %#@%EFI EXPORT END:%#$% %DATE% %TIME%&&CALL:BOXB2&&CALL:PAUSED EXIT /B :BOOT_CREATOR_PROMPT SET "QUERY_MSG= %XLR2%Select a disk to erase%#$%"&&CALL:DISK_MENU @@ -2632,7 +2643,7 @@ SET "RETRY_PART1="&&SET "RETRY_PART2="&&SET "RETRY_PART3="&&SET "EFI="&&ECHO.&&S :BOOT_CREATOR_START ::######################################################################### IF NOT "%PROG_MODE%"=="COMMAND" CLS -CALL:PAD_LINE&&CALL:BOXT2&&ECHO. %#@%BOOT CREATOR START:%#$% %DATE% %TIME%&&ECHO. +CALL:BOXT2&&ECHO. %#@%BOOT CREATOR START:%#$% %DATE% %TIME%&&ECHO. SET "DISK_MSG="&&DISM /cleanup-MountPoints>NUL 2>&1 SET "CHAR_STR=%VHDX_SLOTX%"&&SET "CHAR_CHK= "&&CALL:CHAR_CHK IF DEFINED CHAR_FLG SET "ERROR=1"&&ECHO.%XLR2%ERROR: Remove the space from the VHDX name, then try again.%#$%&&GOTO:BOOT_FINISH @@ -2692,7 +2703,7 @@ CALL SET "VDISK_CHK=%%DISK_%DISK_DETECT%%%" IF "%VDISK_CHK%"=="VDISK" SET "$LTR=%PRI_LETTER%"&&CALL:DISKMGR_UNMOUNT :BOOT_FINISH SET "ADDFILE_CHK="&&SET "VDISK_CHK="&&SET "PATH_TEMP="&&SET "PATH_FILE="&&SET "EFI_LETTER="&&SET "PRI_LETTER="&&SET "TST_LETTER="&&IF "%PROG_MODE%"=="RAMDISK" CALL:HOST_AUTO>NUL 2>&1 -CALL:DEL_DSK&&ECHO.&&ECHO. %#@%BOOT CREATOR END:%#$% %DATE% %TIME%&&CALL:BOXB2&&CALL:PAD_LINE +CALL:DEL_DSK&&ECHO.&&ECHO. %#@%BOOT CREATOR END:%#$% %DATE% %TIME%&&CALL:BOXB2 EXIT /B :ADDFILE_COPY IF "%ADDFILE_CHK%"=="SELECT" EXIT /B