How do you upgrade a BackupAssist installation? Well, up until now, the answer has been: manually.
But one of our Aussie helpdesk team, Aaron, has done a great job in writing a VB script that will download the latest BackupAssist installation to a temp directory, uninstall the old version and install the new version – thereby performing an automated upgrade.
We’ve tested this on a variety of machines – SBS 2003, Vista, XP, Server 2008, and SBS 2008 – and it has worked for us. Now it’s time to turn it over to the community and get some feedback on this.
To run the script – save the text below to a vbs file – say BAUpgrader.vbs – and then run it from the command prompt:
Make sure you’re running the command prompt as the Administrator user, with elevated rights if you have UAC turned on.
If you have any feedback, please post a comment below. We have not yet tested it with management software like Kaseya – but if you’d like to give it a go (in a non-production environment!) please feel free.
Also note that this is a BETA script, so the usual disclaimers apply.
—- BEGIN SCRIPT BELOW – FOR ALL INSTALLATIONS APART FROM SERVER CORE AND HYPER-V SERVER —-
—- Note: this script is subject the same EULA as BackupAssist —-
sTarget = “C:\temp”
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
If Not objFSO.FolderExists(sTarget) Then
strFileURL = “http://www.backupassist.com/downloads/releases/latest/BackupAssistV5.msi”
strHDLocation = “c:\temp\BackupAssistV5.msi”
Set objXMLHTTP = CreateObject(“MSXML2.XMLHTTP”)
objXMLHTTP.open “GET”, strFileURL, false
If objXMLHTTP.Status = 200 Then
WScript.StdOut.Write “Downloading the latest version of BackupAssist…” & VbCrLf & VbCrLf
Set objADOStream = CreateObject(“ADODB.Stream”)
objADOStream.Type = 1 ‘adTypeBinary
objADOStream.Position = 0
Set objFSO = Createobject(“Scripting.FileSystemObject”)
If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation
Set objFSO = Nothing
WScript.StdOut.Write “Download complete” & VbCrLf & VbCrLf
Set objADOStream = Nothing
Set installer = CreateObject(“WindowsInstaller.Installer”)
strTempProdCode = “”
For Each strProductCode In installer.Products
If installer.ProductInfo(strProductCode, “InstalledProductName”) = “BackupAssist v5” Then
strTempProdCode = strProductCode
set fso = Wscript.CreateObject(“Scripting.FileSystemObject”)
If Not strTempProdCode = “” Then
If fso.FileExists(“C:\Temp\BackupAssistV5.msi”) Then
strTemp = strTempProdCode & ” /passive”
Set objShell = CreateObject(“WScript.Shell”)
objShell.Run “%comspec% /c msiexec /x ” & strTemp _
& “& msiexec /package c:\temp\BackupAssistV5.msi /passive”
WScript.StdOut.Write”Automated update was successful”
Else WScript.StdOut.Write”The BackupAssist update did not download. The automated update was unsuccessful”
WScript.StdOut.Write “BackupAssist is not currently installed on this machine!”& VbCrLf &”Automatic updating not available!” & VbCrLf & VbCrLf