Showing posts with label PowerShell. Show all posts
Showing posts with label PowerShell. Show all posts

Thursday, July 14, 2011

Telerik batch installer script for Q2 2011

powershell-telerikReady to update your dev system to Q2 2011 bits from Telerik? Not ready to manually run 12 different MSI installers? No problem. I've updated the simple PowerShell batch installer script that will perform the following actions for you:

  1. Locate and uninstall any previous Telerik product installs
  2. Locate and install any Telerik MSI installers downloaded to your system
    • By default, the script looks for installers in this path:
      C:\Program Files (x86)\Telerik\Downloads\Q2 2011

That's about it. Plain. Simple. Saves you time, and in about 20 minutes or so (for a system with everything) Telerik installed, you'll have all of the Q1 2011 bits uninstalled, and all of the Q2 2011 bits installed. You can learn more about the original script and how to execute it with PowerShell in the original blog post from late 2010.

What about a "unified" installer from Telerik that can do this (and more) for you? It's in the works, so stay tuned. In the mean time, enjoy the Q2 2011 bits and updated batch installer!

Download the updated Q2 2011 batch installer script (ZIP)

Tuesday, March 22, 2011

Updated batch installer for Telerik products

powershell-telerik

As you may recall, with the Q3 2010 release, I created a simple but useful PowerShell script that automates the process of updating your complete Telerik Ultimate Collection toolbox. In short, the script automatically uninstalls all old Telerik installs and then silently runs the MSI installers for all of the new bits. I have updated the script to now work with the Q1 2011 bits!

Usage Reminder

You can review the full overview in the original script post as the core behavior of this PowerShell script has not changed much to support Q1. To use this batch installer, simply:

  1. Download all of the Q1 2011 MSI installers
    • Place them in a single folder (by default, I expect a path of "C:\Program Files (x86)\Telerik\Downloads\Q1 2011\")
  2. Download the latest PowerShell script updated for Q1
  3. Run the script!
    • All pre-Q1 Telerik installs will be removed and all Q1 MSIs that you have downloaded will be installed

You can also always re-run the script and it will only uninstall pre-Q1 installs and only install Q1 bits that are not already installed. In other words, rerunning the script won't uninstall everything and reinstall everything (unless you force it to do that, which is an option when editing the script). This is useful if, for example, an uninstaller fails the first time. Just re-run the batch script to try the uninstaller again.

Download the Script

That's pretty much all there is to it. This is a manual, repetitive task time saver for those of you that, like me, want to update your system or VMs to have all of the latest and great Telerik bits. If you have a clean system with no installs, you can also use this script to quickly string together installs of all Ultimate Collection tools.

Download the updated Q1 2011 batch installer script

Thursday, November 11, 2010

Quickly update all Telerik product installs using PowerShell

powershell-telerik With the Q3 2010 release now available, the challenge of updating your dev environment with the new versions can sometimes seem daunting. After all, the Telerik Ultimate Collection now represents more than 10 products, and thus more than 10 installers. Add any virtual machines you maintain to the mix, and the challenge of updating increases. Fortunately, all Telerik products use MSI installers, and with a little PowerShell we can easily script the complete system update.

Updating Your Telerik Products in 2 Steps

With a handy PowerShell script I've created (available below), you can easily update any system to use all of the latest and greatest Telerik tools in 2 simple steps:

  1. Download all of the Telerik products you want to install
    • Place the MSI installers in one folder
  2. Download and run my Telerik Installer PowerShell script!

That's it. The script will automatically look for and uninstall old versions (pre-Q3) of Telerik tools and then install all of the products you've downloaded. By default, the script will look for the installers in "C:\Program Files (x86)\Telerik\Downloads\Q3 2010\", but if you'd prefer to use a different location, the script can be easily edited.

Run and done

The cool benefit of this script is that you can download your bits, run the script, and then go about your business while the uninstallers and installers run. No need to "babysit" your machine installing and uninstalling software.

On my primary machine (which has an SSD), the entire process took about 10 minutes: 4 minutes to uninstall everything and about 6 minutes to run all of the installers. On a VirtualBox VM running on an external USB drive, the process took about 35 minutes (15 to uninstall, 20 to install).

Regardless of the exact run time, it took exactly 30 seconds of my time to update my entire Telerik toolbox.

Enabling PowerShell Script Execution

If you've never run a PowerShell script, you may have a problem executing this script due to PowerShell's default security settings. To resolve the problem, you simply need to run a PowerShell command that allows script execution. Here's how:

  1. Open a PowerShell command prompt
    • Can be done via Start > All Programs > Accessories > Windows PowerShell
    • Alternatively, right-click my PS1 script and select "Edit with PowerShell"
  2. Execute the following command: Set-ExecutionPolicy Unrestricted
  3. A dialog will pop-up. Confirm your decision to change the execution policy.

Now you will be able to execute this script by simply right-clicking on the .PS1 file selecting "Run with PowerShell."

What about the Telerik Visual Studio Extensions auto-updater?

The Telerik Visual Studio Extensions (VSX) are awesome for updating your existing projects, or for updating individual projects directly from Visual Studio. The Telerik VSX tools can automatically check for newer versions of the Telerik tools, download the bits, and then update your projects. If you only work with 1 or 2 products, this is a great solution!

If you're like me, though, and you have everything Telerik installed (and, really, you should), it's generally easier to update everything at once with the installers for a major Q release. That's where this script comes in handy. Once everything is installed, you can still use the VSX tools to quickly update your projects to use the latest bits.

Side-by-side Installs

You can install many Telerik products side-by-side with older versions. This is sometimes useful when you have projects referencing different versions of the Telerik tools (though there are other options for "isolating" projects). While this script is configured to uninstall everything old, if you'd prefer to keep old versions, a simple script edit can help you skip the uninstalls. If this scenario becomes common, I'll provide a modified version with easy support of this option.

Download the Script

All that's left: Download the PowerShell script. Remember to edit the script if your installers are saved in a different folder. Otherwise, enjoy the simple system updater and feel free to send me feedback and ideas for improvement!