Oct 312012

I was unable to install software or run scripts after the step “Setup windows and ConfigMgr” in the task sequence. Simply because they do not run anymore due to the SCCM Wyse post-deployment scripts that run after deployment. In this guide I want to add a registry key to the image that depends on a choice (variable) in the task sequence.

Step 1 Prepare the Image for the Task Sequence action we’re going to make.

  1. Mount the WIM-image with imagex or a great tool called GImageX.
  2. Add a folder c:\install
  3. Add the following line to the script “AdminSCCM.bat” in c:\windows\setup\ before the line “if exist “c:\windows\system32\fbwfmgr.exe” c:\windows\system32\fbwfmgr /enable
    CALL "C:\install\run.cmd" 
    wsleep 4
  1. You may want to increase the wsleep value if your actions fail like installing software.
  2. Unmount the image and commit changes.

Step 2 Create a task in the Task Sequence.

In this case I only want to add a regkey to the image. When you want to install software you can copy files from a software package to the c:\install folder.

  1. Create a “Run Command Line” task.
  2. Add the following command.
     cmd /c echo REG ADD "HKLM\SOFTWARE\xxxxxxxx\SCCM" /v ImageVersion /t REG_SZ /d %SMSTSimagever% /f >> c:\install\run.cmd"

That`s it. When you run the deployment the AdminSCCM.bat will start the c:\install\run.cmd in a deployed Microsoft Windows Embedded.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>