I some times run into problems while installing SW as a part of my Task Sequence.. Now don’t get me wrong, most times the apply  software works like a charm, and everything is installed without a glitch. But every now and then,  a piece of software comes along that just won’t install as part of the TS.

To name a couple of the more resent ones i encountered, there is Cisco VPN that has a tendency to cut the network connection for just a second during installation, making the TS fail, or Lenovo(IBM) Presentation Director,  that has to have an active desktop in order to install correctly.

Now what I do in these cases (or actually always), is to run a script in end of my TS that sets the computer to auto logon as administrator, and then run a different script that takes care of the installations. Ones the software has been installed the script calls shutdown.exe to restart the computer. By doing this I not only get an extra step in the deployment process, that is TS independent, I also make sure that the machine polices are updated (because of the extra boot)

So now to the Step by Step: Note i assume everybody uses MDT integration, and has made a Toolkit Package ( see this entry on this https://blog.ctglobalservices.com/osdeploy/creating-and-using-toolkit-package/)

1: Create the script(here called Finalize.wsf) that will take care of the auto logon an executions of SW script.


This script will look trough you Toolkit scripts folder and add all scripts defined in the array to RUN ONCE as well as copy them to the computer (in this case C:\windows\temp). It will the update the registry to do one administrative logon.

2. Create a script (here called Postinstall.vbs) to handle the software installation, and remember to have the script call SHOTDOWN.EXE as the final step. The script here checks if Presentation Director software is present, runs it, and then reboots the machine.



The software you want to install must of cause be present on the computer. Remember that the TS has finished at this point and we can not access the sw trough the DP any more. You can either add the software using a Data Image which i will explain in my next post, have it present in your driver package, if you use the DriverPaths1 method https://blog.ctglobalservices.com/osdeploy/drivers/using-bddmdt-driverpaths1-in-sccm/, append it directly to the master image, or copy it during the TS.

3. Place both scripts Finalize.wsf and Postinstall.vbs in your toolkit script folder.

4.Add a step at the end of you task sequence to run the the Finalize.wsf script (Remember to put in a Toolkit step)

image image

Just type cscript.exe “%ScriptRoot%\Finalize.wsf” in a Run Command Line, and the Postinstall.vbs script should be run post TS.