Make changes to WDS/SCCM boot file to run script before Task Sequence:


I recently had a customer who couldn’t re image machines because of some hidden partition stuff on manufacture preloaded machines. It actually turned out that a couple of files needed to be removed prior to running the TS. So we added a  script to be run prior to the launch of the TS, to get rid of these files.

Its not like its a big secret, how you do this, as it is in the WinPE.chm but I thought just make small description of the steps anyhow.

1. MountRW SCCM boot.wim with ImageX

ImageX /MountRW C:boot.wim 1 C:mount

2. Open C:mountwindowssystem32winpeshl.ini

3. Change it to look like beneath.




4. In C:mountwindowssystem32, create PreTS.vbs with the stuff you want to execute.

5. Unmonut the changed image

 – ImageX /unmount /commit C:mount

6. On your WDS server add the changed boot.wim


You could add any number of different tasks to be executed if needed…



This entry was posted in SCCM. Bookmark the permalink.

One Response to Make changes to WDS/SCCM boot file to run script before Task Sequence:

  1. Unknown says:

    I have tried to do this many times in my SCCM 2K7 environment and it’s not working. I can easily apply the changes and commit them to the .wim file, however, when I Update the DP’s it’s ripping out the lines I’m adding to the winpeshl.ini file. I can’t, for the life of me, figure out how these changes are being made when I Update. I’ve even gone into the Program Files\Microsoft Configuration Manager\OSD\boot\i386 folder and made the changes to the boot.ID.wim file. I then created a Boot Image Using Microsoft Deployment. The changes in the winpeshl.ini file on the share mentioned above do not come over to the new boot image I’m creating. Do you have any idea why this is not working? Why is it either ripping out the text I’m placing into the winpeshl.ini file, or replacing the file completely with an original one from somewhere????Thanks for any help you can offer.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s