HP Integrity rx2800 Using Microsoft ImageX with RDP to Capture and Deploy Wind - Page 10

Run Script, Run this script

Page 10 highlights

"Image Count" > temp2.txt rem Setting an environment variable with the number of partition images stored on w2k8r2image.wim for /F "usebackq delims==" %%i IN (`type temp2.txt`) DO set num=%%i del temp2.txt echo %num% set /a numimages=%num:~13,2% echo %numimages% rem Checking the number of images stored in w2k8r2image.wim rem if OEM partition was captured, this number should be equal to 3. Rem if OEM is not present in w2k8r2image.wim, the scripts stops without error if %numimages% neq 3 goto :nohpsp echo Deploying HPSP rem Create diskpart script to mount OEM partition on volume Y echo list volume |diskpart |find "400 MB" > temp.txt for /F "usebackq delims==" %%i IN (`type temp.txt`) DO set str=%%i set volume=%str:~9,1% echo select volume %volume% > diskpart.txt echo assign letter=Y >> diskpart.txt echo exit >> diskpart.txt rem Mounting OEM partition diskpart /s diskpart.txt rem Deploying OEM partition %ALTIRIS_SHARE%\waik\tools\ia64\imagex /apply %ALTIRIS_SHARE%\hpfeatures\ws7-ia64-en_us\images\w2k8r2image.wim 3 Y:\ set returncode=%errorlevel% del temp.txt del diskpart.txt goto end :nohpsp echo Not deploying HPSP : not found set returncode=0 :end exit /b %returncode% b) In the Choose the script operating system field, select Windows and click Next. c) In the Script Run Location field, select On the client computer. d) In the Automation pre-boot environment field, select WinPE Managed (64 bit). 8. Add a Run Script task to deploy the captured MSDATA image. Follow these steps: a) Select Run this script and enter the following script: rem Deploying MSDATA partition %ALTIRIS_SHARE%\waik\tools\ia64\imagex /apply %ALTIRIS_SHARE%\hpfeatures\ws7-ia64-en_us\images\w2k8r2image.wim 1 C:\ b) In the Choose the script operating system field, select Windows and click Next. c) In the Script Run Location field, select On the client computer. d) In the Automation pre-boot environment field, select WinPE Managed (64 bit). 10

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

"Image Count" > temp2.txt
rem Setting an environment variable with the number of partition images
stored on w2k8r2image.wim
for /F "usebackq delims==" %%i IN (`type temp2.txt`) DO set num=%%i
del temp2.txt
echo %num%
set /a numimages=%num:~13,2%
echo %numimages%
rem Checking the number of images stored in w2k8r2image.wim
rem if OEM partition was captured, this number should be equal to 3.
Rem if OEM is not present in w2k8r2image.wim, the scripts stops without
error
if %numimages% neq 3 goto :nohpsp
echo Deploying HPSP
rem Create diskpart script to mount OEM partition on volume Y
echo list volume |diskpart |find "400 MB" > temp.txt
for /F "usebackq delims==" %%i IN (`type temp.txt`) DO set str=%%i
set volume=%str:~9,1%
echo select volume %volume% > diskpart.txt
echo assign letter=Y >> diskpart.txt
echo exit >> diskpart.txt
rem Mounting OEM partition
diskpart /s diskpart.txt
rem Deploying OEM partition
%ALTIRIS_SHARE%\waik\tools\ia64\imagex /apply
%ALTIRIS_SHARE%\hpfeatures\ws7-ia64-en_us\images\w2k8r2image.wim 3
Y:\
set returncode=%errorlevel%
del temp.txt
del diskpart.txt
goto end
:nohpsp
echo Not deploying HPSP : not found
set returncode=0
:end
exit /b %returncode%
b)
In the
Choose the script operating system
field, select
Windows
and click
Next
.
c)
In the
Script Run Location
field, select
On the client computer
.
d)
In the
Automation pre-boot environment
field, select
WinPE Managed (64 bit)
.
8.
Add a
Run Script
task to deploy the captured MSDATA image. Follow these steps:
a)
Select
Run this script
and enter the following script:
rem Deploying MSDATA partition
%ALTIRIS_SHARE%\waik\tools\ia64\imagex /apply
%ALTIRIS_SHARE%\hpfeatures\ws7-ia64-en_us\images\w2k8r2image.wim 1
C:\
b)
In the
Choose the script operating system
field, select
Windows
and click
Next
.
c)
In the
Script Run Location
field, select
On the client computer
.
d)
In the
Automation pre-boot environment
field, select
WinPE Managed (64 bit)
.
10