Set WshShell = CreateObject("WScript.Shell") ' Initial check for registry entry, in case it isn't running at all on start of script If readfromRegistry("HKLM\Software\CompanyName\PCSetup\Office2013Upgrade\InstallingStatus", "") = "1" then ' If installation is running at start of script, then enter a loop do until Ended = 1 Ended = 1 ' Check again for the installation status to see if it is running If readfromRegistry("HKLM\Software\CompanyName\PCSetup\Office2013Upgrade\InstallingStatus", "") = "1" then ' If installation is running, execute the HTA application to provide a status window to the user ' This window currently displays for 5 minutes, during which time this script is paused Return = WshShell.Run("\\domain\apps\Public\Updates\OfficeUpdates\Office2013_message.hta", 1, true) Ended = 0 End If ' Sleep the script for 1 second before continuing loop wscript.sleep 1000 ' Loop back to the top to re-check the Installation status. This will continue until the status = 0 loop ' Once the loop is ended because the installation is completed, display this message msgbox("Office 2013 Install has finished. You can now use Office applications.") End If ' Function used to provide access to the registry function readFromRegistry (strRegistryKey, strDefault ) Dim WSHShell, value On Error Resume Next Set WSHShell = CreateObject("WScript.Shell") value = WSHShell.RegRead( strRegistryKey ) if err.number <> 0 then readFromRegistry= strDefault else readFromRegistry=value end if set WSHShell = nothing end function