The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • Archives

  • Meta

PowerShell is King – Download all VC++ runtimes using a script

Posted by Mikael Nystrom on August 5, 2014

Yes, it is true, sine I create reference images for customers i always need the VC++ runtimes, and yes i need all of them. Microsoft actually has one page with all the latest versions, well the page points to all the separate downloads, anyway. Since automation is nice and PowerShell is a god workhorse to do the job i used one of my old download engine and modified it slightly.

image

How does it work?

The script reads 2 parameters from the command line, the XML file and the download folder. In the XML file each file has its settings (some of them not used here), basically the URL, name of file, where to store it and things like that. The script does a for each loop until all files has been downloaded, if one file could not be downloaded, just run the script once more and it will download the missing files, not touching the existing ones

Step-By-Step, kind of

Download the script and the XML file from this location http://1drv.ms/1y2MGcc

Remove the Windows Download Blocking (You know, right click on file, properties, unblock)

Execute the script from an elevated PowerShell prompt like this

.\Get-Downloads.ps1 -DownloadFile .\download.xml –DownloadFolder  ‘C:\Downloads’

Wait until done

In the C:\Downloads folder you should now have a separate folder for all VC++ runtimes.

/mike

9 Responses to “PowerShell is King – Download all VC++ runtimes using a script”

  1. CLParker said

    Brilliant! Just Brilliant! Thanks As Always Mike!

  2. Jason Baxter said

    This just saved me about 20 minutes and deploying this with PSADT just made my life a lot easier. Thanks.

  3. Martin said

    THANK YOU!

  4. […] So a good friend of mine Mikael Nyström wrote this awesome script about Always needing the VC++ Redist editions for when he makes reference images. The post can be read in full here http://deploymentbunny.com – Powershell is king. […]

  5. Reblogged this on mdtcmdeploy and commented:
    Really nice script from Mikael on how to get all the latest C++ Reds for your reference image.

  6. Douglas said

    Thank you very much Mikael!

  7. Mike said

    Thank you Mikael! Like the others have said this has saved me a ton of time. I expanded the XML (great job by the way putting everything in XML) to download pretty much everything needed to populate my MDT hydration share (tip of the hat to Johan).

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 3,866 other followers

%d bloggers like this: