<job id="AdobeAcrobatReaderDC">
<script language="VBScript" src="..\..\scripts\ZTIUtility.vbs"/>
<script language="VBScript"> 

'//----------------------------------------------------------------------------
'// Purpose: Used to Install Adobe Acrobat Reader DC
'// Usage: cscript Install-AdobeAcrobatReaderDC.wsf [/debug:true]
'// Version: 1.0 - June 25 2014 - Mikael Nystrom
'//
'// This script is provided "AS IS" with no warranties, confers no rights and 
'// is not supported by the author.
'//----------------------------------------------------------------------------

Option Explicit 
Dim iRetVal 

'On Error Resume Next
iRetVal = ZTIProcess
ProcessResults iRetVal
On Error Goto 0 

'//---------------------------------------------------------------------------
'// Function: ZTIProcess()
'//---------------------------------------------------------------------------
Function ZTIProcess() 

	oLogging.CreateEntry oUtility.ScriptName & ": Starting installation", LogTypeInfo

	Dim sFile

	sFile = oUtility.ScriptDir & "\source\AcroRdrDC1500820082_en_US.exe"

	'// Disable Zone Checks
	oEnv("SEE_MASK_NOZONECHECKS") = 1 		
	
	If not oFSO.FileExists(sFile) then
		oLogging.CreateEntry oUtility.ScriptName & " " & sFile & " was not found, unable to Install", LogTypeError
		ZTIProcess = Failure
		Exit Function
	End if
	
	'// Disable Zone Checks
	oEnv("SEE_MASK_NOZONECHECKS") = 1 

	iRetVal = oUtility.RunWithHeartbeat("""" & sFile & """ /sAll")
	
	if (iRetVal = 0) or (iRetVal = 3010) then
		ZTIProcess = Success 
	Else 
		ZTIProcess = Failure
	End If
	
	'/// Enable Zone Checks
	oEnv.Remove("SEE_MASK_NOZONECHECKS")	
	
	oLogging.CreateEntry oUtility.ScriptName & ": Return code from command = " & iRetVal, LogTypeInfo
	oLogging.CreateEntry oUtility.ScriptName & ": Finished", LogTypeInfo

End Function 

</script>
</job>















