Install software after TS finishes, but as part of the deployment process.

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.

____________________-

By | 2009-02-05T16:14:04+00:00 February 5th, 2009|Packaging & Installation|9 Comments

About the Author:

Michael Petersen
Twitter: @OSDeployLinkedin: Michael PetersenMicrosoft Community Contributor

9 Comments

  1. […] Install software after TS finishes, but as part of the deployment b…/b […]

  2. […] news by Michael Petersen « CompTIA Training » Data Backup Software Can Save You Time And Money Home Theater […]

  3. […] Install software after TS finishes, but as part of the deployment … […]

  4. Trikke November 8, 2010 at 9:57 - Reply

    I attempted the code above on a Windows 7 x64 enterprise deployment, during the task sequence i checked the registry and found that the changes have been applied, but after a reboot there is no autologon and the registry changes where gone?

    Any ideas?

  5. Terry June 10, 2011 at 22:56 - Reply

    Can you repost the autologin script? the section where it was to be displayed is blank, although I see your postinstall.vbs just fine.

    Thank you

  6. Joakim Tomren January 28, 2014 at 19:31 - Reply

    Nice script!

    Did some changes, by the way It is not a good idë pasting code in a page like this, people copying the code needs to do a lot of changes.

    changed all the ” and ‘

    Changed also the following path to the postinstall.vbs script file (there might be another way of doing this but this worked for me):

    If oFSO.FileExists(sScriptRoot & “” & sFile) then
    wscript.echo sScriptRoot
    oLogging.CreateEntry “Copying ” & sScriptRoot & “” & sFile & ” to ” & sPostInstallFolder & sFile, LogTypeInfo
    oFSO.CopyFile sScriptRoot & “” & sFile, sPostInstallFolder & sFile, true

    • Joakim Tomren January 28, 2014 at 23:09 - Reply

      Also this needs to be removed: �

  7. spanish jokes funny September 12, 2014 at 19:12 - Reply

    My brother suggested I would possibly like this weeb site.
    He used to bbe totally right. This post truly made mmy day.
    You cann’t believe just how so much time I had spent for this information! Thank you!

    Stop by my blog post spanish jokes funny

  8. Bryan Linton April 12, 2015 at 16:06 - Reply

    Cool blog post, thanks!

    I ran into the same issue you mentioned with Cisco VPN client installation and used a simpler workaround. Instead of invoking the Cisco installer via command line in my MDT Application, I solved the problem by invoking an old-school batch script that lives in the same folder as the VPN Client Application files in the deployment share.

    InstallVPNClient.cmd
    ————————-
    @echo off

    echo Copying VPN Client installation files to machine…
    xcopy *.* “C:Delete MeVPNClient” /C/H/Q/Z/Y
    echo
    echo Launching VPN Client Installer…
    START “VPN Client Install” /WAIT msiexec.exe /i “C:Delete MeVPNClientvpnclient_setup.msi” /qb- REBOOT=ReallySuppress
    echo VPN Client Installed
    xcopy Profiles “C:program files (x86)cisco systemsvpn clientProfiles” /E/C/I/Q/H/Z/Y
    echo Profiles Copied – Installation Complete
    ping localhost >nul
    exit

    Since the batch file copies all installation files to a temp folder on the machine first, THEN launches the install from local storage, the momentary disruption of network connectivity doesn’t cause a problem. The task sequence continues without trouble.

    Thought I’d share for any others searching for a workaround for this specific application issue.

Leave A Comment