Quantcast
Channel: Windows PE Latest Topics
Viewing all articles
Browse latest Browse all 69

WinPE automated wim deployment

$
0
0

Hallo,

I try to make bootable usb ssd with few windows images for my company. I found somthing like this: http://www.peppercrew.nl/index.php/2015/02/automated-usb-wim-deployment/.

This would be perfect, but I have wim images that are 20 Gigabyte (fat32 is only for 4GB files). I made two partitions on usb drive one for boot.wim etc and other for other files. Can someone help me with scirpt in startnet.cmd. I have to modify the script so that not only detect usb drive but also the name from volume with wim images and install chosen form menu os. 

Thank you in advance for your help!

Bing

wpeinit 
@ECHO OFF 
C: 
CD\ 
CLS

:MENU

ECHO ============= Installeren Thin Image ============= 
ECHO ————————————————– 
ECHO 1.  Thinclient T5740 
ECHO ————————————————– 
ECHO 2.  ThinPC 8200 
ECHO ————————————————– 
ECHO ==========PRESS ‘Q’ TO QUIT========== 
ECHO.

SET INPUT= 
SET /P INPUT=Please select a number:

IF /I ‘%INPUT%’==’1’ GOTO Selection1 
IF /I ‘%INPUT%’==’2’ GOTO Selection2 
IF /I ‘%INPUT%’==’Q’ GOTO Quit 
CLS

ECHO ============INVALID INPUT============ 
ECHO ————————————- 
ECHO Please select a number from the Main 
echo Menu [1-2] or select ‘Q’ to quit. 
ECHO ————————————- 
ECHO ======PRESS ANY KEY TO CONTINUE======

PAUSE > NUL 
GOTO MENU 
CLS 
:Selection1
for /F "usebackq tokens=1,2,3,4 " %%i in (`wmic logicaldisk get caption^,description^,drivetype 2^>NUL`) do (

if %%l equ 2 ( 
echo %%i is a USB drive. 
        ) 
Diskpart /s %%i\diskpart\diskpart.txt 
cd\ 
%%i\Imagex.exe /apply %%i\Thinclient\TC.WIM 1 C: 
        ) 


:Selection2
for /F "usebackq tokens=1,2,3,4 " %%i in (`wmic logicaldisk get caption^,description^,drivetype 2^>NUL`) do (

if %%l equ 2 ( 
echo %%i is a USB drive. 
        ) 
Diskpart /s %%i\diskpart\diskpart.txt 
cd\ 
%%i\Imagex.exe /apply %%i\Thinclient\TC2.WIM 1 C: 
        ) 

:Quit 
CLS 
ECHO —————————————————- 
ECHO =============PRESS ANY KEY TO CONTINUE============== 
ECHO —————————————————- 

PAUSE>NUL 
EXIT

Viewing all articles
Browse latest Browse all 69

Trending Articles