MSEndpointMgr

Updated script to Slipstream Adobe Reader with PowerShell

Time flies by and it’s already almost a year ago I released my PowerShell script to slipstream Adobe Reader for deployment with ConfigMgr 2012 as an application. During this time, I’ve received a lot of positive feedback from readers of this blog regarding on how to improve the script. I’ve finally come to my senses and actually updated it quite a bit.

What’s new

The core functionality of the script to first extract the downloaded executable and then apply the patches haven’t been changed that much, except for modernizing the code a bit. Here’s what I’ve added and changed:

  • Added a check to see if any version of Adobe Reader is already installed on the system where the slipstreaming is being performed, this to prevent error messages about that the product is already installed when applying the base installer to the AIP.
  • Removed the output from Write-Output and replaced it with support for standard PowerShell parameters. Use -Verbose instead to see detailed messages about what the script is doing.
  • In the script where Start-Process is calling msiexec, a check have been added to see if msiexec returned an exit code of 0. If not, the script will bail out and not continue.
  • If there would be several quarterly or security patches, those results are now being sorted and should be executed in the correct order.
AdobeReaderAIP

Download the script

You can download the script from the TechNet Gallery.

Nickolaj Andersen

Chief Technical Architect and Enterprise Mobility MVP since 2016. Nickolaj has been in the IT industry for the past 10 years specializing in Enterprise Mobility and Security, Windows devices and deployments including automation. Awarded as PowerShell Hero in 2015 by the community for his script and tools contributions. Creator of ConfigMgr Prerequisites Tool, ConfigMgr OSD FrontEnd, ConfigMgr WebService to name a few. Frequent speaker at conferences such as Microsoft Ignite, NIC Conference and IT/Dev Connections including nordic user groups.

12 comments

  • Hi Nickolaj,
    Sorry for not replying sooner, didn’t get the e-mail about it. I’ll give it a go and I’ll let you know the results.
    Just to confirm, when you ran it the 2nd time (after you uninstalled it), the setup/install window came up? And did you go all the way to the end of the installation? Or was there no UI at all?
    Thanks,
    Dan

  • Hi Nickolaj,
    Just saw your article today, the script looks very handy. However it’s failing for me. Once it starts extracting the content from the exe file, the installation window pops up, if I cancel, the script fails saying it couldn’t locate the acroread.msi file after extraction (I’m guessing because the temp folder to where they were extracted goes away when I cancel the installation) and finishes saying an error ocurred.
    Also, I first ran the script on my desktop which had 11.0.9 (now has 11.0.10 after a first attempt) and it didn’t detect it as being installed. However the above situation also occurs on another desktop without Reader installed.
    Thanks,
    Dan

    • Hi Dan,
      The script will start the Adobe Package extraction and show the GUI (haven’t found out a way to hide it that actually works), so you shouldn’t be hitting cancel. Do you mean that it doesn’t even extract? Perhaps the latest version requires some extra code. I’ll look into this when I get back from my vacation this weekend.
      By the way, when you run the script, do it on a machine that doesn’t have any previous version of Adobe Reader installed or it will fail.
      Regards,
      Nickolaj

      • Hi Nickolaj,
        Thanks for the reply. I tried it on a machine with and without Reader installed, failed on both and didn’t detect the installed one.
        Right, so the GUI is meant to appear, so I should just click next, etc and actually install the Reader? The only other option is to cancel which doesn’t extract the files.
        Have a good vacation.
        Dan

      • Hi Dan,
        It would appear that Adobe has changed some of the extract parameters then if it’s not extracted automatically (even though it’s showing a GUI). Will look into this and get back to you 🙂
        Regards,
        Nickolaj

      • Hi Dan,
        I can’t find any problems with the script and the latest version 11.0.10. I ran it like this:
        .\New-AdobeReaderAIP.ps1 -FileName AdbeRdr11010_en_US.exe -DownloadFolder G:\AdobePatch\Downloads -TargetFolder G:\AdobePatch\AIP -Verbose
        Since I had Adobe Reader installed previously, the script complained about that and I uninstalled it before I could create the AIP. I’m running this on a Windows 8.1 64-bit systems, but that shouldn’t matter. I’d suggest that you setup a new virtual machine running Windows 8.1, and from there try to run the script. It could be that you’re machines have been clogged with previous Adobe Reader installations that may interfere with the AIP installation process (wild guess though).
        Regards,
        Nickolaj

  • Disregard previous comment. I got it to work. Thank you so much for this. It is a huge benefit to me.

    • Hi Jason,
      You’re welcome. If you have any feedback I’d be happy to hear it!
      You’re correct, it should be pointed to the file name only. I try to always include a screenshot of the command line I use to run the script successfully so that it should be clear on how to use it 🙂
      Regards,
      Nickolaj

  • Thank you for the script. We just did Adobe Reader update few weeks ago. I added a pop up window to user that close web brower and Adobe Reader if they were opened. When doing Application Deployment from SCCM, sometimes need to think about what users are doing, otherwise they are going to complain. 🙂

    • Hi Sandy,
      Let me know if you have any question regarding the script, of ideas for improvements. Have you checked out the PowerShell App Deployment Toolkit? It’s really nice and gives you options for the user to postpone the installation, or to close applications before install etc. It’s really cool!
      Regards,
      Nickolaj

Sponsors