ImageX Error: System could not find specified file (FIX)

By arwidmark / April 20, 2007

If manually mounting images using imagex.exe gives you the error: “System could not find
specified file”,  then you might be missing the WIM filter driver on that system.

 ImageX.exe needs to be able to load the WIM filter driver and it can be installed by using the WIMFLTR.INF to install it.

Browsed to X:\Windows AIK\Tools\x86 (Where X: = the drive WAIK is installed)


Right clicked WIMFLTR.INF and selected Install.

How to use SMS 2003 OSD FP Update and ImageX for System Backup purposes

By arwidmark / April 17, 2007

Welcome


This article describes how to create a package for SMS that will perform a full computer backup of Windows XP. This scenario is not supported by Microsoft.


 Background


This scenario is using SMS 2003 to push out a Windows PE 2005 ISO Image that will connect to the SMS server (DP) and executes a script that start the backup.


Note: The SMS 2003 SP2 Server used in this guide has all SMS roles. The Server name is SRV001 and the domain name is TSLAB. The WinPE version used is Windows 2005 with boot-in-ram. Client computers need to have about 256 MB RAM. All below steps can be performed on SRV001.


The guide covers the following steps


·        Create a custom Windows PE 2005 image


·        Create the SMS Package and scripts that performs the backup


Part 1 – Create a custom WinPE image


1.      On SRV001, copy the WINPE folder from the Windows PE 2005 CDROM to D:\


2.      Rename the D:\WinPE folder to Build_x86


3.      Copy the SAMPLES\SERVERSP1-REMOVELIST.TXT from the Windows PE 2005 CDROM to D:\Build_x86


4.      Edit the D:\Build_x86\SERVERSP1-REMOVELIST.TXT file and remove the following lines

inf\net21x4.inf
system32\urlmon.dll
system32\drivers\dc21x4.sys



Note
: urlmon.dll is required for network support, and the *21×4.* files is for Virtual PC Nic support.


5.      Build a WinPE folder structure by inserting a Windows Server 2003 SP1 CD-ROM (F: in this example), start a command prompt and type (Press Enter after each line):


cd /d D:\Build_x86


mkimg.cmd F: D:\OSD_BACKUP


6.      Reduce the size of WinPE to about 94 MB by creating a batch file named ReduceWinPE.cmd in the D:\Build_x86 folder containing the following lines


cd /d D:\OSD_BACKUP\i386


for /f “eol=;” %%i in (D:\Build_x86\serversp1-removelist.txt) do del /q %%i


7.      Execute the previously created D:\Build_x86\ReduceWinPE.cmd batch file


8.      Copy the Timeout.exe file from C:\Windows\System32 to D:\OSD_BACKUP\i386\System32


9.      Edit and replace the contents of the D:\OSD_BACKUP\i386\System32\startnet.cmd file with the following text:


REM Start networking
regsvr32 /s netcfgx.dll
factory -minint
netcfg -v -winpe
net start dhcp
net start nla


REM Establish network connection to Backup Server
Timeout /T 5
Net Use F: \\SRV001\Packages /user:TSLAB\BackupAccount [email protected]


REM Perform the backup
start /wait cmd /c \\SRV001\Packages\osdbackup\backup.cmd


REM Reboot after backup is completed
Exit


10.   Create a bootable Windows PE 2005 image iso image, by starting a command prompt and type (Press Enter after each line):


cd /d D:\Build_x86


OSCDIMG.EXE -betfsboot.com -n D:\OSD_BACKUP D:\OSD_BACKUP.ISO


 


Part 2 – Create the Package


1.      On SRV001, create a folder named D:\Images and share it as Images.


2.      Create a user named BackupAccount in the domain, assign the BackupAccount user account Modify permissions to the D:\Images folder.


3.      Create a folder named D:\Packages and share it as Packages.


4.      Create a subfolder named D:\Packages\osdbackup and copy the previously created D:\OSD_BACKUP.ISO file to the d:\Packages\osdbackup folder.


5.      Create a text file named Winnt.sif in the d:\Packages\osdbackup folder with the following text:


[SetupData]
BootDevice = “ramdisk(0)”
BootPath = “\i386\System32\”
OsLoadOptions = “/noguiboot /fastdetect /minint /rdexportascd /rdpath=OSD_BACKUP.ISO”


6.      From the D:\OSD_BACKUP\i386 folder (WinPE 2005 structure), copy the following files to D:\Packages\osdbackup.

ntdetect.com
Setupldr.bin


7.      From the C:\Program Files\Windows AIK\Tools\x86 folder (WAIK Install), copy the following file to D:\Packages\osdbackup.

ImageX.exe


8.      In the D:\Packages\osdbackup folder, rename Setupldr.bin to ntldr.


9.      Create a textfile named Prepare.cmd in the d:\Packages\osdbackup folder with the following text.


REM Prepare for new loader
attrib c:\ntdetect.com -h -r -s
ren c:\ntdetect.com ntdetect.old
attrib c:\ntldr -h -r -s
ren c:\ntldr ntldr.old

REM Copy WinPE and new loader
Copy \\SRV001\Packages\osdbackup\OSD_BACKUP.ISO c:\
Copy \\SRV001\Packages\osdbackup\ntdetect.com c:\
Copy \\SRV001\Packages\osdbackup\ntldr c:\
Copy \\SRV001\Packages\osdbackup\Winnt.sif c:\


10.   Create a textfile named Backup.cmd in the d:\Packages\osdbackup folder with the following text.


REM Clean up and reset loader info
del c:\ntdetect.com
del c:\ntldr
del c:\winnt.sif
del c:\OSD_BACKUP.ISO
ren c:\ntdetect.old ntdetect.com
ren c:\ntldr.old ntldr


REM Start the Backup
\\SRV001\Packages\osdbackup\ImageX /capture /compress maximum C:\ \\SRV001\Images\%computername%.wim “Backup”
Exit


Note:  The line after “REM Start the Backup” might have been wrapped and should be added as one line


11.   Create a SMS application package that starts the Prepare.cmd file. Configure the package so that SMS restarts the computer after running the package.


 

For John – Don’t mess with my audio drivers (BDD 2007)

By arwidmark / April 8, 2007

For John – Don’t mess with my audio drivers

 

Welcome

This article describes how to configure BDD 2007 Zero Touch to support Two-Tier drivers like SigmaTel and RealTek High Definition Audio cards…

Background

BDD 2007 Driver Repository is using the Microsoft.BDD.PnpEnum.exe utility to scan for drivers to inject at the client. This works great for standard drivers, but some drivers is using a Two-Tier model where a bus driver load the ”real” driver. In order for the utility to ”see” the real driver, the bus driver needs to be loaded in WinPE.

This article shows how…

Note: Other drivers like NVidia Nforce Nic drivers also uses this Two-Tier model, but the BDD 2007 Workbench actually has, in code, routines for handling that. If you add the Nforce driver, the workbench will automatically also inject the bus driver.

Requirements

This guide only covers the issue where the pnpid is not detected and therefor not install. The XP Image still need to be prepared with the correct hotfixes, chipset and bus drivers.

1.      Make sure that the following hotfixes are installed in the XP reference image

a.      888111 (HD Audio)

b.      883667 (Video)

c.      890463 (PCI Express)

2.      Update Sysprep.inf with the pnpid’s and paths (and of course add the drivers it points to)

Example:

;
; Added for ich7usb Controller Support
;
PCI\VEN_8086&DEV_27C8 = C:\Drivers\IntelInf\ich7usb.inf
PCI\VEN_8086&DEV_27C9 = C:\Drivers\IntelInf\ich7usb.inf
PCI\VEN_8086&DEV_27CA = C:\Drivers\IntelInf\ich7usb.inf
PCI\VEN_8086&DEV_27CB = C:\Drivers\IntelInf\ich7usb.inf
PCI\VEN_8086&DEV_27CC = C:\Drivers\IntelInf\ich7usb.inf
;
; Added for ich7core Controller Support
;
PCI\VEN_8086&DEV_27B0 = C:\Drivers\IntelInf\ich7core.inf
PCI\VEN_8086&DEV_27B8 = C:\Drivers\IntelInf\ich7core.inf
PCI\VEN_8086&DEV_27B9 = C:\Drivers\IntelInf\ich7core.inf
PCI\VEN_8086&DEV_27BD = C:\Drivers\IntelInf\ich7core.inf
PCI\VEN_8086&DEV_27DA = C:\Drivers\IntelInf\ich7core.inf
PCI\VEN_8086&DEV_27D0 = C:\Drivers\IntelInf\ich7core.inf
PCI\VEN_8086&DEV_27D2 = C:\Drivers\IntelInf\ich7core.inf
PCI\VEN_8086&DEV_27D4 = C:\Drivers\IntelInf\ich7core.inf
PCI\VEN_8086&DEV_27D6 = C:\Drivers\IntelInf\ich7core.inf
PCI\VEN_8086&DEV_27E0 = C:\Drivers\IntelInf\ich7core.inf
PCI\VEN_8086&DEV_27E2 = C:\Drivers\IntelInf\ich7core.inf




 The guide covers the following steps

·        Add HD Audio bus driver without PNP support in WinPE (like the WinPE 2005 image generated by BDD 2007 Workbench)

·        Add HD Audio bus driver with PNP support in WinPE (when compiling your own WinPE images)

 

 

Add HD Audio bus driver using txtsetup.sif

This shows how to add the HD Audio bus driver without PNP support in WinPE 2005. This is the recommended method for BDD 2007 since it doesn’t require recompiling the WinPE image, and is a lot faster than using WinPE 2005 PNP support.

This example assumes that you have created an OSD deployment point and created the WinPE 2005 Generic Image by updating the Deployment Point. In the example my OSD Deployment point is on D:\ZTI.

1.      Request, download and extract the 888111 hotfix to c:\tmp

2.      Copy the hdaudbus.sys file from c:\tmp\commonfiles to D:\ZTI\Boot\Source\i386\system32\drivers

3.      Modify the D:\ZTI\Boot\Source\i386\txtsetup.sif file using following info

a.      In the [SCSI.LOAD] section add

hdaudbus = hdaudbus.sys,4

b.      In the [HardwareIdsDatabase] section, add

PCI\CC_0403 =  “hdaudbus”

4.      Update OSD with the new WinPE structure (D:\ZTI\Boot\Source)

5.      Create a new Zero Touch Installation CD

6.      Done J

 



 

Add HD Audio bus driver using PNP

This shows how to add the HD Audio bus driver with PNP support in WinPE 2005. This method is quite cool since it involves compiling your own WinPE image  J (But takes longer time to load)

In this example I’m assuming you have the Windows Server 2003 SP1 media in a folder named D:\Distribution\Operatin Systems\Windows Server 2003 SP1.

1.      From a WinPE 2005 Image, copy the contents of the WinPE folder to D:\Build_x86

2.      Using a command prompt, type the following commands to create a WinPE 2005 image with WMI, PNP and all other features BDD 2007 needs…

cd /d D:\Build_x86

mkimg ”D:\Distribution\Operatin Systems\Windows Server 2003 SP1” D:\MyWinPE2005 /PNP /WMI

BuildOptionalComponents /S: ”D:\Distribution\Operating Systems\Windows Server 2003 SP1” /D:D:\MyWinPE2005 /Q

md ”C:\Documents and Settings\All Users\Application Data”

Note: Some commands may have been wrapped

3.      Request, download and extract the 888111 hotfix to c:\tmp

4.      Copy the hdaudbus.inf file from c:\tmp\commonfiles to D:\MyWinPE2005\i386\inf

5.      Copy the hdaudbus.sys file from c:\tmp\commonfiles to D:\MyWinPE2005\i386\System32\Drivers

6.      Add Quiet=Yes to the [WinPE] section in all winbom.ini files in D:\MyWinPE2005

7.      Update OSD with the new WinPE structure (D:\MyWinPE2005)

8.      Create a new Zero Touch Installation CD

9.      Done J

 

 

BDD Extension: ZTERemoveCompression (boot mgr compressed Fix)

By arwidmark / April 3, 2007

To add the ZTERemoveCompression.wsf script to your scripts folder as an accessible script











1.


Copy & Paste the code below the —Code Snippet— below in this article into a blank text file and save it as ZTERemoveCompression.wsf.


2.


Copy or Move the ZTERemoveCompression.wsf script to your scripts folder under your distribution share.


(Ex: \\server1\distribution$\scripts\ZTERemoveCompression.wsf)


To add the ZTERemoveCompression.wsf script as a task to the task sequence of a build























1.


Start Deployment Workbench.


2.


In the console tree, navigate to Builds.


3.


In the details pane, right-click build (where build is the build whose task sequence you want to modify), and then click Properties.


4.


Click the Task Sequence tab, navigate to Non-OSD Refresh Onlye group, click Add, and then click Task.


Note   Ensure that you add the task prior to the Apply Windows PE task so that the drive compression is removed before winpe gets applied locally.


5.


Complete the Properties tab of the new task by using the information in the table below, accepting default values if not otherwise specified, and then click Apply.


Completing the Properties Tab of the New Task
















In this box Do this

Name


Type Remove C Drive Compression.


Description


Type description (where description is text that explains why the file is needed).


Command line


Type Cscript.exe “%SCRIPTROOT%\ZTERemoveCompression.wsf”.



6.


Complete the Options tab of the new task by using the information in the table below, accepting default values if not otherwise specified, and then click OK.


Completing the Options Tab of the New Task













In this box Do this

Success codes


Type 0. (The ZTERemoveCompression.wsf script returns these codes upon successful completion.)


Conditions list box


Add any conditions that might be necessary .



Upon completion of adding the task to run the ZTERemoveCompression.wsf script, the C: drive will now have its compression removed beforeWinPE gets applied in a refresh scenario.


–Code Snippet–



  


  



Booting WinPE 2.0 from a third party PXE Server

By arwidmark / March 28, 2007

 Welcome

This article describes how to configure a third party PXE Server (Jounin Tftpd32) for booting Windows PE 2.0

Perform all steps on a Vista Machine (the files/folders can of course later be transferred to a Windows 2003 SP1 server)

The guide covers the following steps

  • Configure and the Install WAIK
  • Create a x86 Windows PE 2.0 image
  • Prepare the PXE Server folder structure
  • Create a new BCD store
  • Install and Configure the PXE Server (Tftpd)
  • Create an x64 Windows PE 2.0 Image
  • Create a BCD store with multiple choices

Step 1 – Creating the Server Structure

Download and install WAIK to the default location
Start an elevated command prompt (Run as administrator) and type the following commands

cd /d “C:\Program Files\Windows AIK\Tools\PETools”
copype x86 c:\winpe_x86
ren winpe.wim winpe_x86.wim
imagex /mount c:\winpe_x86\winpe_x86.wim 1 c:\winpe_x86\mount
md C:\PXEServer\TFTPRoot\Boot\Fonts
copy c:\winpe_x86\mount\Windows\Boot\PXE\pxeboot.n12  C:\PXEServer\TFTPRoot\boot /y
copy c:\winpe_x86\ISO\boot\fonts\*.* c:\PXEServer\TFTPRoot\Boot\Fonts /y
copy c:\winpe_x86\mount\Windows\Boot\PXE\bootmgr.exe C:\PXEServer\TFTPRoot /y
imagex /unmount c:\winpe_x86\mount
copy C:\winpe_x86\ISO\boot\boot.sdi C:\PXEServer\TFTPRoot\boot /y
copy c:\winpe_x86\winpe_x86.wim C:\PXEServer\TFTPRoot\boot /y

Note: Each line beginning with imagex or copy is a separate line (might have been wrapped)
                                

Step 2 – Create a new BCD Store

In the C:\PXEServer folder, create a batchfile in named CreateBCD.cmd with the following content

Rem Creates BCD (boot configuration data) for Windows PE 2.0
set BCD-File=c:\PXEServer\Tftproot\Boot\BCD
del %BCD-File%
Bcdedit /createstore %BCD-File%
Bcdedit /store %BCD-File% /create {ramdiskoptions}
Bcdedit /store %BCD-File% /set {ramdiskoptions} ramdisksdidevice  boot
Bcdedit /store %BCD-File% /set {ramdiskoptions} ramdisksdipath  \boot\boot.sdi
for /f “tokens=1-3” %%a in (‘Bcdedit /store %BCD-File% /create /d “WinPE x86” /application osloader’) do set guid1=%%c
Bcdedit /store %BCD-File% /set %guid1% systemroot \Windows
Bcdedit /store %BCD-File% /set %guid1% detecthal Yes
Bcdedit /store %BCD-File% /set %guid1% winpe Yes
Bcdedit /store %BCD-File% /set %guid1% osdevice ramdisk=[boot]\Boot\winpe_x86.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /set %guid1% device ramdisk=[boot]\Boot\winpe_x86.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /create {bootmgr} /d “Windows Vista BootManager” 
Bcdedit /store %BCD-File% /set {bootmgr} timeout 30
Bcdedit /store %BCD-File% /set {bootmgr} displayorder %guid1%
Bcdedit /store %BCD-File% /enum all

Note: Each line beginning with bcdedit or for is a separate line (might have been wrapped)
In the Command prompt, run the CreateBCD.cmd batch file.
 

Step 3 – Configure the PXE Server

Download Tftpd32 v3.03 from http://www.jounin.net/tftpd32_download.html and extract the tftpd32.exe and tftpd.hlp files to C:\PXEServer.
Start Tftpd32 (Unblock for Vista Firewall) and configure the following TFTP Server Settings:
– Base Directory: C:\PXEServer\TFTPRoot
– Allow “\” As virtual root
– TFTP Security: Read Only
– Use anticipation windows of: 8192

Note: Using anticipation windows can greatly improve transfer speed, but since it is prohibited by the TFTP specification, a special warning is displayed when this box is checked.
DHCP Server Settings, change to reflect your environment.

– IP pool starting address: 192.168.1.100
– Size of pool: 99
– Boot File: /boot/pxeboot.n12
– Default Router: 192.168.1.1
– Mask: 255.255.255.0
– Domain name: tslab.net

Optional – Add a x64 Image

Create a x64 Windows PE 2.0 Image

copype amd64 c:\winpe_x64
ren winpe.wim winpe_x64.wim
copy c:\winpe_x64\winpe_x64.wim C:\PXEServer\TFTPRoot\boot /y
In the C:\PXEServer folder, create a batch file in named CreateBCD2.cmd with the following content.

Rem Creates BCD (boot configuration data) for two Windows PE 2.0 images
set BCD-File=c:\PXEServer\Tftproot\Boot\BCD
del %BCD-File%
Bcdedit /createstore %BCD-File%
Bcdedit /store %BCD-File% /create {ramdiskoptions}
Bcdedit /store %BCD-File% /set {ramdiskoptions} ramdisksdidevice  boot
Bcdedit /store %BCD-File% /set {ramdiskoptions} ramdisksdipath  \boot\boot.sdi

for /f “tokens=1-3” %%a in (‘Bcdedit /store %BCD-File% /create /d “WinPE x86” /application osloader’) do set guid1=%%c
Bcdedit /store %BCD-File% /set %guid1% systemroot \Windows
Bcdedit /store %BCD-File% /set %guid1% detecthal Yes
Bcdedit /store %BCD-File% /set %guid1% winpe Yes
Bcdedit /store %BCD-File% /set %guid1% osdevice ramdisk=[boot]\Boot\winpe_x86.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /set %guid1% device ramdisk=[boot]\Boot\winpe_x86.wim,{ramdiskoptions}

for /f “tokens=1-3” %%a in (‘Bcdedit /store %BCD-File% /create /d “WinPE x64” /application osloader’) do set guid2=%%c
Bcdedit /store %BCD-File% /set %guid2% systemroot \Windows
Bcdedit /store %BCD-File% /set %guid2% detecthal Yes
Bcdedit /store %BCD-File% /set %guid2% winpe Yes
Bcdedit /store %BCD-File% /set %guid2% osdevice ramdisk=[boot]\Boot\winpe_x64.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /set %guid2% device ramdisk=[boot]\Boot\winpe_x64.wim,{ramdiskoptions}

Bcdedit /store %BCD-File% /create {bootmgr} /d “Windows VISTA BootManager”
Bcdedit /store %BCD-File% /set {bootmgr} timeout 30
Bcdedit /store %BCD-File% /set {bootmgr} displayorder %guid1% %guid2%
Bcdedit /store %BCD-File% /enum all

Note: Each line beginning with bcdedit or for is a separate line (might have been wrapped)

 

Optional – BCD with multiple entries.

In the C:\PXEServer folder, create a batchfile in named CreateBCD3.cmd with the following content.

Rem Creates BCD (boot configuration data) for three Windows PE 2.0 images
set BCD-File=c:\PXEServer\Tftproot\Boot\BCD
del %BCD-File%
Bcdedit /createstore %BCD-File%
Bcdedit /store %BCD-File% /create {ramdiskoptions} 
Bcdedit /store %BCD-File% /set {ramdiskoptions} ramdisksdidevice  boot
Bcdedit /store %BCD-File% /set {ramdiskoptions} ramdisksdipath  \boot\boot.sdi

for /f “tokens=1-3” %%a in (‘Bcdedit /store %BCD-File% /create /d “WinPE x86” /application osloader’) do set guid1=%%c
Bcdedit /store %BCD-File% /set %guid1% systemroot \Windows
Bcdedit /store %BCD-File% /set %guid1% detecthal Yes
Bcdedit /store %BCD-File% /set %guid1% winpe Yes
Bcdedit /store %BCD-File% /set %guid1% osdevice ramdisk=[boot]\Boot\winpe_x86.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /set %guid1% device ramdisk=[boot]\Boot\winpe_x86.wim,{ramdiskoptions}

for /f “tokens=1-3” %%a in (‘Bcdedit /store %BCD-File% /create /d “WinPE x86 2” /application osloader’) do set guid2=%%c
Bcdedit /store %BCD-File% /set %guid2% systemroot \Windows
Bcdedit /store %BCD-File% /set %guid2% detecthal Yes
Bcdedit /store %BCD-File% /set %guid2% winpe Yes
Bcdedit /store %BCD-File% /set %guid2% osdevice ramdisk=[boot]\Boot\winpe_x86_2.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /set %guid2% device ramdisk=[boot]\Boot\winpe_x86_2.wim,{ramdiskoptions}

for /f “tokens=1-3” %%a in (‘Bcdedit /store %BCD-File% /create /d “WinPE x64” /application osloader’) do set guid3=%%c
Bcdedit /store %BCD-File% /set %guid3% systemroot \Windows
Bcdedit /store %BCD-File% /set %guid3% detecthal Yes
Bcdedit /store %BCD-File% /set %guid3% winpe Yes
Bcdedit /store %BCD-File% /set %guid3% osdevice ramdisk=[boot]\Boot\winpe_x64.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /set %guid3% device ramdisk=[boot]\Boot\winpe_x64.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /create {bootmgr} /d “Windows VISTA BootManager” Bcdedit /store %BCD-File% /set {bootmgr} timeout 30
Bcdedit /store %BCD-File% /set {bootmgr} displayorder %guid1% %guid2% %guid3%
Bcdedit /store %BCD-File% /enum all

Note: Each line beginning with bcdedit or for is a separate line (might have been wrapped)

/ Johan

Windows Vista OPK Workshop

BDD LiteTouch Modification: Upgrade Option Removal

By arwidmark / February 22, 2007

Since most corporations stay clear of any Upgrade solutions in their environment it may be important for them not to confuse their techs with the Upgrade option in the first place.  Below describes two ways of removing the Upgrade option as a choice.


Warning: This requires direct modification of Microsofts BDD scripts and files. Do NOT attempt this modification if you are not comfortable with scripting and xml changes.


Make backup copies of every file modified below before you start.


Scenario 1 – Disabling Upgrade


In this scenario all we are going to do is disable the Upgrade option so it cannot be selected, though it will still show up on the DeploymentType wizard. This is the less complicated modication.



  • Browse to your deployment point share and open the scripts folder.
  • Locate the file DeployWiz_Initialization.vbs and open it with notepad.
  • Search for InitializeDeploymentType and you should see the that it is a function.
  • Under  the last statement in that function include the following line:

    • DTRadio2.Disabled = True

  • Save and close the file.

Your Upgrade option on the deployment type pane will now be permanently disabled and can not be selected.


Scenario 2 – Removing Upgrade


This scenario completely removes the Upgrade option from the wizard so it cannot be seen. This requires a few more edits than Scenario 1.



  • Browse to your deployment point share and open the scripts folder.
  • Locate the file DeployWiz_Definition_ENU.xml and open it with notepad.
  • Search for DTRadio2 and you should see that DTRadio2 is an input object. 
  • Locate on the same line where it states “Input type=radio” and change it to the following:

    • Input type=hidden

  • Right Below that line after the You need to insert the following to start your comment tag:


  • That section should now look like this for example:


    •    hidden name=”DeploymentType” id=”DTRadio2″ value=”UPGRADE” accesskey=u language=vbscript >
        

        


  • Save and close the file.

We changed the input to hidden so it could not be seen, but we still wanted the object DTRadio2 to still exist so we did not get errors from other functions trying to access it.  The are xml comment tags used to comment out the description of the Upgrade option. 


You should now be able to run the deployment wizard and only have two deployment types to select which are Refresh and Replace.

Preinstalling the Virtual Server R2 Shunt Driver

By arwidmark / February 21, 2007

Here is a quick but hopefully useful guide for preinstalling the Virtual Server R2 Shunt Driver into Windows Server 2003.


Extract the contents from the SCSI Shunt Driver.vfd file (found in C:\Program Files\Microsoft Virtual Server\Virtual Machine Additions) to a folder, C:\Drivers\MSVMSCSI in this example (Note: move the content in Win2003 folder up one level, eg. the same level as txtsetup.oem)


The content of the C:\Drivers\MSVMSCSI folder should have the following files


MSVMSCSI
msvmscsi.inf
msvmscsi.sys
TXTSETUP.OEM
vmadd_msvmscsi_sys.cat


Then modify the TXTSETUP.OEM file to look like below


[Disks]
d1 = “Microsoft VM Accelerated Additions Driver Disk (Windows Server 2003)”, \msvmscsi, \


[Defaults]
scsi = MSVMSCSI_2003


[scsi]
MSVMSCSI_2003 = “(Windows Server 2003) Additions Accelerated SCSI Driver”, msvmscsi


[Files.scsi.MSVMSCSI_2003 ]
driver = d1, msvmscsi.sys, msvmscsi
inf    = d1, msvmscsi.inf
catalog = d1, vmadd_msvmscsi_sys.cat


[HardwareIds.scsi.MSVMSCSI_2003]
id = “PCI\VEN_9004&DEV_7078&SUBSYS_70781414&REV_02″,”msvmscsi”



On the distribution share, containing the Windows Server 2003 SP1 setup files, create a folder structure like \i386\$OEM$\TEXTMODE, copy the C:\Drivers\MSVMSCSI content to this folder.


On the distribution share, containing the Windows XP SP2 setup files , create a folder structure like \i386\$OEM$\$1\Drivers\MSVMSCSI, copy the C:\Drivers\MSVMSCSI content to this folder.


Then Modify the unattend.txt file to look like this


[MassStorageDrivers]
    “(Windows Server 2003) Additions Accelerated SCSI Driver” = OEM
    “IDE CD-ROM (ATAPI 1.2)/PCI IDE Controller” = “Retail”


[OEMBootFiles]
    msvmscsi.inf
    msvmscsi.sys
    TXTSETUP.OEM
    vmadd_msvmscsi_sys.cat
    MSVMSCSI


[Unattended]
    OemPreinstall = Yes
    OemPnPDriversPath = “Drivers\MSVMSCSI”
    DriverSigningPolicy = Ignore


 


 

BDD Extension: ZTEUSMTConfigFile

By arwidmark / February 20, 2007

Update 05/01/2007: Updated code to include full path to config.xml to fix the pathing issue in ZTI deployment.

ZTEUSMTConfigFile.wsf takes advantage of the Customsettings.ini rules in order to define your USMT Config file within your rules. Also the other big advantage of this extension is it copies the config file you define from the distribution share to the local hard drive so scanstate can find it during the process, something that currently does not happen in BDD today. The last item it does is it adds the argument “/config:” to the scanstate arguments for processing.

This extension was created to mimic the process of the USMTMigFiles property. It uses a customsettings.ini property, it copies the config file to the local tools folder, and it adds the command line argument for /config to the end of the scanstage arguments.

To add the ZTEUSMTConfigFile.wsf script to your scripts folder as an accessible script

  1. Copy & Paste the CODE below the –CODE Snippet— below in this article into a blank text file and save it as ZTEUSMTConfigFile.wsf.
  2. Copy OR Move the ZTEUSMTConfigFile.wsf script TO your scripts folder under your distribution share.(Ex: \\server1\distribution$\scripts\ZTEUSMTConfigFile.wsf)

 

To add the required Custom Properties to your customsettings.ini or “Rules” tab of your deployment point

1. Start Deployment Workbench.
2. In the console tree, navigate to Deploy->Deployment Points.
3. In the details pane, right-click dp (where dp is the deployment point whose customsettings.ini you want to modify), and then click Properties.
4. Click the Rules tab, navigate to Properties=  and add the following custom property:

USMTConfigFile

 

5. Set the values of the custom property in a section that will be processed by your Priorities list at the top of your customsettings.ini

Sample CustomSettings.ini snip…

Priorities=USMTSettings, Default
Properties=USMTConfigFile

[USMTSettings] USMTMigFiles1=CustomApps.xml
USMTMigFiles2=CustomData.xml
USMTConfigFile=Config.xml

[Default] OSInstall=Y

Note: If this custom property is not assigned a value than the ZTEUSMTConfigFile.wsf will not process.

Note 2: Do NOT add /config: manually to your ScanStateArgs property manually as this extension will do that for you, similar to USMTMigFiles does for Migration xmls.

To add the ZTEUSMTConfigFile.wsf script as a task to the task sequence of a build

1. Start Deployment Workbench.
2. In the console tree, navigate to Builds.
3. In the details pane, right-click build (where build is the build whose task sequence you want to modify), and then click Properties.
4. Click the Task Sequence tab, navigate to Non-Upgrade group, click Add, and then click Task.

Note   Ensure that you add the task prior to the Capture User State task so that the config file is copied before scanstate runs.

5. Complete the Properties tab of the new task by using the information in the table below, accepting default values if not otherwise specified, and then click Apply.

Completing the Properties Tab of the New Task

In this box Do this
Name Type Process USMT Config File.
Description Type description (where description is text that explains why the file is needed).
Command line Type Cscript.exe “%SCRIPTROOT%\ZTEUSMTConfigFile.wsf”.

 

6. Complete the Options tab of the new task by using the information in the table below, accepting default values if not otherwise specified, and then click OK.

Completing the Options Tab of the New Task

In this box Do this
Success codes Type 0. (The ZTEUSMTConfigFile.wsf script returns these codes upon successful completion.)
Conditions list box Add any conditions that might be necessary (I recommend duplicating the conditions found for Capture User State task).

 

Upon completion of adding the task to run the ZTEUSMTConfigFile.wsf script, the Capture User State task can now process the /config file without having to find or copy it manually before hand.

–Code Snippet–

<job id=”ZTEUSMTConfigFile”>
<script language=”VBScript” src=”ZTIUtility.vbs”/>
<script language=”VBScript”>

‘ //***************************************************************************
‘ // ***** Script Header *****
‘ //
‘ // Solution:  Solution Accelerator Extension for Business Desktop Deployment
‘ // File:      ZTEUSMTConfigFile.wsf
‘ //
‘ // Purpose:   Find and copy the USMT configuration file to the local drive for use with scanstate
‘ //
‘ // Usage:     cscript ZTEUSMTConfigFile.wsf [/debug:true] ‘ //  Requires The following custom properties to be defined in the customsettings.ini
‘ //    *  USMTConfigFile
‘ //
‘ // Customer Script Version:     1.0.3
‘ //
‘ // Extension History:
‘ // 1.0.4    JOS  5/01/2007  Fixed Config.xml error on ZTI in code snippet below. Check bolded code in snippet for change Uses full path now.
‘ // 1.0.1    JOS  2/20/2007  Added hardcoded sUSMTPath value as USMT is not installed yet. This only works with the CAB solution.
‘ // 1.0.0    JOS  2/19/2007  Created initial version.
‘ //
‘ // Customer History:
‘ //
‘ // ***** End Header *****
‘ //***************************************************************************

‘//—————————————————————————-
‘//
‘//  Global constant and variable declarations
‘//
‘//—————————————————————————-

Option Explicit

Dim iRetVal, sUSMTPath

‘//—————————————————————————-
‘//  End declarations
‘//—————————————————————————-

‘//—————————————————————————-
‘//  Main routine
‘//—————————————————————————-

On Error Resume Next
iRetVal = ZTIProcess
ProcessResults iRetVal
On Error Goto 0

‘//—————————————————————————
‘//
‘//  Function: ZTIProcess()
‘//
‘//  Input: None
‘//
‘//  Return: Success – 0
‘//  Failure – non-zero
‘//
‘//  Purpose: Perform main ZTI processing
‘//
‘//—————————————————————————
Function ZTIProcess()

 Dim oMigXML
Dim sBaseArgs
Dim sXML
Dim sUSMTConfigFile
Dim sFoundXML

 iRetVal = Success

 oLogging.CreateEntry “Retrieving USMTConfigFile property”, LogTypeInfo

sUSMTConfigFile = oEnvironment.Item(“USMTConfigFile”)

 If sUSMTConfigFile <> “” Then

‘ This is taken directly out of the ZTIUserState.wsf script.
sUSMTPath = InstallUSMT

  ‘ Make sure the file exists in the directory
If not oFSO.FileExists(sUSMTPath & “\” & sUSMTConfigFile) then
iRetVal = oUtility.FindFile(sUSMTConfigFile, sFoundXML)
If iRetVal = Success then
oLogging.CreateEntry “Copying ” & sFoundXML & ” to local install directory.”, LogTypeInfo
oFSO.CopyFile sFoundXML, sUSMTPath & “\” & sUSMTConfigFile, true
Else
oLogging.CreateEntry “WARNING: Unable to find specified USMT migration XML file ” & sUSMTConfigFile, LogTypeWarning
End if
Else
iRetVal = oUtility.FindFile(sUSMTConfigFile, sFoundXML)
If iRetVal = Success then
If oFSO.GetFile(sFoundXML).DateLastModified > oFSO.GetFile(sUSMTPath & “\” & sUSMTConfigFile).DateLastModified then
oLogging.CreateEntry “Copying updated ” & sFoundXML & ” to local install directory overwriting existing file.”, LogTypeInfo
oFSO.CopyFile sFoundXML, sUSMTPath & “\” & sUSMTConfigFile, true
End if
End if
End if

‘ Add the /config command to the base arguments if file exists
If oFSO.FileExists(sUSMTPath & “\” & sUSMTConfigFile) then
oLogging.CreateEntry “Adding ‘/config:” & sUSMTConfigFile & “‘ to the command arguments”, LogTypeInfo

sBaseArgs = oEnvironment.Item(“ScanStateArgs”)
If sBaseArgs = “” then
sBaseArgs = “/v:5 /o /c”
End if

   sBaseArgs = sBaseArgs & ” /config:” & Chr(34) & sUSMTPath & “\” & sUSMTConfigFile & Chr(34)
oEnvironment.Item(“ScanStateArgs”) = sBaseArgs

  Else
oLogging.CreateEntry “Skipping ” & sUSMTConfigFile & ” because it was not found”, LogTypeWarning
End if

Else
oLogging.CreateEntry “USMTConfigFile property is either not defined or is empty, exiting ZTEUSMTConfigFile.wsf”, LogTypeInfo

 End If

 ZTIProcess = iRetVal

End Function

‘//—————————————————————————
‘//
‘//  Function: InstallUSMT
‘//
‘//  Input: none
‘//
‘//  Return: path to USMT files (blank if failure)
‘//
‘//  Purpose: Install the USMT 3.0 files locally
‘//
‘//—————————————————————————

Function InstallUSMT

 Dim sInstaller
Dim iRetVal
Dim sCmd
Dim sUSMTPath
Dim sExtractPath
Dim iRetryCount

‘ Find USMT 3.0 installer and install it if it isn’t already present

 If oFSO.FileExists(oEnv(“ProgramFiles”)  & “\USMT30\scanstate.exe”) then

  ‘ Already installed, use it

 ElseIf oEnvironment.Item(“OSVersion”) = “2000” or oEnvironment.Item(“OSVersion”) = “XP” or oEnvironment.Item(“OSVersion”) = “2003” then

  ‘ Figure out the platform-specific installer name

  If UCase(oEnvironment.Item(“Architecture”)) = “X86” then
sInstaller = “InstallUSMT30_x86_2000andXP.exe”
Else
sInstaller = “InstallUSMT30_x64_XP.exe”
End if

‘ Find the UPDATE.EXE-based installer.

  iRetVal = oUtility.FindFile(sInstaller, sUSMTPath)
If iRetVal <> Success then

   oLogging.CreateEntry “Unable to find ” & sInstaller & ” required to perform the user state migration.”, LogTypeInfo

  Else

   ‘ Perform the installation

   oLogging.CreateEntry “USMT installer found at ” & sUSMTPath & “.”, LogTypeInfo
sCmd = “””” & sUSMTPath & “”” /quiet /norestart /nobackup”
iRetVal = oUtility.RunWithHeartbeat(sCmd)
If iRetVal <> 0 and iRetVal <> 3010 then
oLogging.CreateEntry “Non-zero return code from USMT 3.0 installation command, rc = ” & iRetVal, LogTypeInfo
End if

  End if

 Else  ‘ On Windows Vista

‘ Figure out the platform-specific installer name

  sInstaller = “InstallUSMT30_” & oEnvironment.Item(“Architecture”) & “_vista.msu”

‘ Find component-based installer

  iRetVal = oUtility.FindFile(sInstaller, sUSMTPath)
If iRetVal <> Success then

   oLogging.CreateEntry “Unable to find ” & sInstaller & ” required to perform the user state migration.”, LogTypeInfo

  Else

   ‘ Perform the installation

   oLogging.CreateEntry “USMT installer found at ” & sUSMTPath & “.”, LogTypeInfo
sCmd = “%systemroot%\system32\wusa.exe “”” & sUSMTPath & “”” /quiet /norestart”

   iRetryCount = 0
Do While iRetryCount < 5

    iRetryCount = iRetryCount + 1
iRetVal = oUtility.RunWithHeartbeat(sCmd)
If iRetVal = 0 or iRetVal = 3010 then
Exit Do
ElseIf iRetryCount < 5 then
oLogging.CreateEntry “USMT installation failed with rc = ” & iRetVal & “, will retry in 15 seconds”, LogTypeInfo
WScript.Sleep 15000
End if

   Loop

   If iRetVal <> 0 and iRetVal <> 3010 then
oLogging.CreateEntry “Non-zero return code from USMT 3.0 installation command, rc = ” & iRetVal, LogTypeInfo
End if

  End if

 End if

‘ See if it’s there now.  If not, look for the CAB

 If oFSO.FileExists(oEnv(“ProgramFiles”)  & “\USMT30\scanstate.exe”) then

  ‘ Already installed, use it

  sUSMTPath = oEnv(“ProgramFiles”)  & “\USMT30”

 Else

  ‘ Find USMT30_<architecture>.cab

  iRetVal = oUtility.FindFile(“USMT30_” & oEnvironment.Item(“Architecture”) & “.cab”, sUSMTPath)
If iRetVal <> Success then
oLogging.CreateEntry “ERROR: Unable to find USMT30_” & oEnvironment.Item(“Architecture”) & “.cab file so it is not possible to install USMT 3.0, aborting”, LogTypeError
InstallUSMT = “”
Exit Function
End if
oLogging.CreateEntry “USMT 3.0 files will be extracted from ” & sUSMTPath, LogTypeInfo

‘ Find EXTRACT.EXE

  iRetVal = oUtility.FindFile(“EXTRACT.EXE”, sExtractPath)
If iRetVal <> Success then
oLogging.CreateEntry “ERROR: Unable to find EXTRACT.EXE file needed to extract contents of USMT30.CAB file, aborting”, LogTypeError
InstallUSMT = “”
Exit Function
End if
oLogging.CreateEntry sExtractPath & ” will be used to extract contents of CAB file.”, LogTypeInfo

‘ Do the extraction

  oUtility.VerifyPathExists oUtility.LocalRootPath & “\Tools\” & oEnvironment.Item(“Architecture”)
sCmd = “cmd.exe /c “”””” & sExtractPath & “”” /y /e “”” & sUSMTPath & “”” /l “”” & oUtility.LocalRootPath & “\Tools\” & oEnvironment.Item(“Architecture”) & “”””””
iRetVal = oShell.Run(sCmd, 0, true)
If iRetVal <> 0 then
oLogging.CreateEntry “Non-zero return code extracting cab file, rc = ” & iRetVal, LogTypeError
InstallUSMT = “”
Exit Function
End if

‘ Set the new path

sUSMTPath = oUtility.LocalRootPath & “\Tools\” & oEnvironment.Item(“Architecture”)

 End if

If oFSO.FileExists(sUSMTPath  & “\scanstate.exe”) then
oLogging.CreateEntry “USMT 3.0 is installed at ” & sUSMTPath, LogTypeInfo
InstallUSMT = sUSMTPath
Else
oLogging.CreateEntry “ERROR: USMT 3.0 could not be installed”, LogTypeError
InstallUSMT = “”
End if

End Function

</script>
</job>

BDD Extension: ZTECustomConnect

By arwidmark / February 15, 2007

During the LTI and ZTI deployment process, you may require access to a network resource that is on a server different from that hosting the deployment point. In order to access resources on another server though you must somehow authenticate to it first. For example, you might want to install an application from a shared folder on a server other than that hosting the deployment point that the BDD 2007 scripts use.


Using the ZTIConnect.wsf script, you can connect to other servers and access resources on them. The syntax for the ZTIConnect.wsf script is as follows (where unc_path is a UNC path to connect to the server):

Cscript.exe “%SCRIPTROOT%\ZTIConnect.wsf” /uncpath:unc_path

In most instances, you run the ZTIConnect.wsf script as a task sequencer task. Run the ZTIConnect.wsf script prior to tasks requiring access to a server other than the server hosting the deployment point.


— MODIFICATION HERE —


Unlike ZTIConnect.wsf above, ZTECustomConnect.wsf can be used to connect resources defined in the customsettings.ini instead of the task sequencer command line. It also utilizes custom credentials to connect to these resources as opposed to using the standard defined UserID, UserPassword, & UserDomain properties.


ZTECustomConnect.wsf takes advantage of the Customsettings.ini rules in order to customize the connection to your resources needed for a given location/role/etc. This allows more of a dynamic connection to resources utilizing seperate credentials than those supplied for the distribution share connection (Ex: UserID property, etc).


To add the ZTECustomConnect.wsf script to your scripts folder as an accessible script











1.


Copy & Paste the code below the —Code Snippet— below in this article into a blank text file and save it as ZTECustomConnect.wsf.


2.


Copy or Move the ZTECustomConnect.wsf script to your scripts folder under your distribution share.


(Ex: \\server1\distribution$\scripts\ZTECustomConnect.wsf)


To add the required Custom Properties to your customsettings.ini or “Rules” tab of your deployment point




















1.


Start Deployment Workbench.


2.


In the console tree, navigate to Deploy->Deployment Points.


3.


In the details pane, right-click dp (where dp is the deployment point whose customsettings.ini you want to modify), and then click Properties.


4.


Click the Rules tab, navigate to Properties=  and add the following custom properties:


CustomUNCPath, CustomUserID, CustomUserPassword, CustomUserDomain


Note   Ensure that you add a comma between each custom property.


5.


Set the values of the custom properties in a section that will be processed by your Priorities list at the top of your customsettings.ini


Sample CustomSettings.ini snip…


Priorities=MyApplicationsShare, Default
Properties=CustomUNCPath, CustomUserID, CustomUserPassword, CustomUserDomain
 
[MyApplicationsShare]
CustomUNCPath=\\appserver1\applications
CustomUserID=appServiceAcct
CustomUserPassword=$AppInstall
CustomUserDomain=MyDomain

[Default]
OSInstall=Y


Note: If any of these custom properties are not assigned a value than the ZTECustomConnect.wsf will not process.


To add the ZTECustomConnect.wsf script as a task to the task sequence of a build






















1.


Start Deployment Workbench.


2.


In the console tree, navigate to Builds.


3.


In the details pane, right-click build (where build is the build whose task sequence you want to modify), and then click Properties.


4.


Click the Task Sequence tab, navigate to group (where group is the group in which you want to run the ZTECustomConnect.wsf script), click Add, and then click Task.


Note   Ensure that you add the task prior to any tasks requiring access to the target server.


5.


Complete the Properties tab of the new task by using the information in the table below, accepting default values if not otherwise specified, and then click Apply.


Completing the Properties Tab of the New Task
















In this box Do this

Name


Type Custom Connect to server (where server is the name of the server to which you want to connect).


Description


Type description (where description is text that explains why the connection needs to be made).


Command line


Type Cscript.exe “%SCRIPTROOT%\ZTECustomConnect.wsf”.



6.


Complete the Options tab of the new task by using the information in the table below, accepting default values if not otherwise specified, and then click OK.


Completing the Options Tab of the New Task













In this box Do this

Success codes


Type 0. (The ZTECustomConnect.wsf script returns these codes upon successful completion.)


Conditions list box


Add any conditions that might be necessary (in most instances this task requires no conditions).



Upon completion of adding the task to run the ZTECustomConnect.wsf script, subsequent tasks can access network resources on the server specified in the CustomUNCPath custom property defined in the customsettings.ini as described ablove.


–Code Snippet–



  


  



Page 14 of 15