This project is read-only.

Can't open installation package

Topics: Archive - General
Oct 23, 2014 at 9:47 PM
I just found this tool, and it looks pretty nice. I've written a script to deploy Java 8 update 25 and want to deploy it using SCCM 2012. I've tested the script and it works properly. I set the application up to be deployed as described in the documentation and it fails with error 1619, which is "This installation package could not be opened." I've looked in the SCCM local cache and the files are there (installation package and powershell script) and it is being called with the correct command line.
Does anyone have an idea what the problem might be and how to fix it?
Oct 24, 2014 at 5:15 PM
I fought this at first with 2012.

You can use "Deploy-Application.EXE" with no parameters like this.

However, when using parameters you have to call the program like this Deploy-Application.EXE -deploymenttype uninstall.
Oct 24, 2014 at 9:23 PM
Thanks for the info. I tried it several different ways:
Deploy-Application.EXE
Deploy-Application.EXE -deploymenttype install
Deploy-Application.EXE -deploymenttype "install"
Deploy-Application.EXE Deploy-Application.ps1
Deploy-Application.EXE "Deploy-Application.ps1"
They all failed with the same error.

Do you have any other suggestions?
Oct 25, 2014 at 2:47 AM
Can you post your script and the logs from the installation?
Oct 27, 2014 at 3:03 PM
Here is the log (there is also a Java7Update65_7.0.650_Uninstall.log, which uninstalls successfully and an empty Java8U25Setup.log which is from the package it can not find):
[27-10-2014 05:53:19] [Initialization] Oracle_Java_8u25_x86_EN_01 setup started.
[27-10-2014 05:53:19] [Initialization] Script [C:\Windows\ccmcache\w\AppDeployToolkit\AppDeployToolkitExtensions.ps1] dot-source invoked by [C:\Windows\ccmcache\w\AppDeployToolkit\AppDeployToolkitMain.ps1]
[27-10-2014 05:53:19] [Initialization] Oracle_Java_8u25_x86_EN_01 script version is [1.0.0]
[27-10-2014 05:53:19] [Initialization] Deploy Application script version is [3.2.0]
[27-10-2014 05:53:19] [Initialization] The following non-default parameters were passed to [Deploy Application]: [-DeploymentType install]
[27-10-2014 05:53:19] [Initialization] App Deploy Toolkit Main script version is [3.2.0]
[27-10-2014 05:53:19] [Initialization] App Deploy Toolkit Extensions version is [1.0.0]
[27-10-2014 05:53:19] [Initialization] PowerShell version is [3.0 x64]
[27-10-2014 05:53:19] [Initialization] PowerShell host is [ConsoleHost version 3.0]
[27-10-2014 05:53:19] [Initialization] OS version is [Microsoft Windows 7 Enterprise 64-bit 6.1.7601]
[27-10-2014 05:53:20] [Initialization] Hardware platform is [Virtual:Hyper-V]
[27-10-2014 05:53:20] [Initialization] Computer name is [VM-TE-TEST]
[27-10-2014 05:53:20] [Initialization] Current user is [Domain\VM-TE-TEST$]
[27-10-2014 05:53:20] [Initialization] Current Culture is [en-US] and UI language is [EN]
[27-10-2014 05:53:20] [Initialization] Deployment type is [Installation]
[27-10-2014 05:53:20] [Initialization] Script [C:\Windows\ccmcache\w\AppDeployToolkit\AppDeployToolkitMain.ps1] dot-source invoked by [C:\Windows\ccmcache\w\Deploy-Application.ps1]
[27-10-2014 05:53:20] [Initialization] No User is logged on
[27-10-2014 05:53:21] [Initialization] Session 0 detected.
[27-10-2014 05:53:21] [Initialization] Installation is running in [NonInteractive] mode.
[27-10-2014 05:53:21] [Pre-Installation] Evaluating disk space requirements...
[27-10-2014 05:53:21] [Pre-Installation] Disk space requirements are met.
[27-10-2014 05:53:21] [Pre-Installation] Getting deferral history...
[27-10-2014 05:53:21] [Pre-Installation] Getting Registry key [Registry::\HKEY_LOCAL_MACHINE\SOFTWARE\PSAppDeployToolkit\DeferHistory\Oracle_Java_8u25_x86_EN_01] ...
[27-10-2014 05:53:21] [Pre-Installation] Registry key does not exist: [Registry::\HKEY_LOCAL_MACHINE\SOFTWARE\PSAppDeployToolkit\DeferHistory\Oracle_Java_8u25_x86_EN_01]
[27-10-2014 05:53:21] [Pre-Installation] User now has [0] deferrals remaining.
[27-10-2014 05:53:21] [Pre-Installation] User has until [2014-10-28 05:53:21Z] remaining.
[27-10-2014 05:53:21] [Pre-Installation] Checking for running applications [iexplore,chrome,firefox]...
[27-10-2014 05:53:21] [Pre-Installation] Applications are not running.
[27-10-2014 05:53:21] [Pre-Installation] Finished checking running applications.
[27-10-2014 05:53:22] [Pre-Installation] Running Show-InstallationProgress
[27-10-2014 05:53:22] [Pre-Installation] Deleting Registry Key [Registry::\HKEY_LOCAL_MACHINE\SOFTWARE\Company\ManagedClient\WSUSCustomUpdates\Oracle\Java]...
[27-10-2014 05:53:23] [Pre-Installation] Failed to delete registry key [Registry::\HKEY_LOCAL_MACHINE\SOFTWARE\Company\ManagedClient\WSUSCustomUpdates\Oracle\Java]: Cannot find path '\HKEY_LOCAL_MACHINE\SOFTWARE\Company\ManagedClient\WSUSCustomUpdates\Oracle\Java' because it does not exist.
[27-10-2014 05:53:23] [Pre-Installation] Getting information for installed Application Name [Java 7 Update]...
[27-10-2014 05:53:23] [Pre-Installation] Found installed application [Java 7 Update 65] version [7.0.650] matching application name [Java 7 Update]
[27-10-2014 05:53:24] [Pre-Installation] Removing Application [Java 7 Update 65 ]...
[27-10-2014 05:53:24] [Pre-Installation] Execute-MSI: Product code specified, attempting to resolve product code to an application name and version...
[27-10-2014 05:53:24] [Pre-Installation] Getting information for installed Product Code [{26A24AE4-039D-4CA4-87B4-2F03217065FF}]...
[27-10-2014 05:53:24] [Pre-Installation] Found installed application [Java 7 Update 65] version [7.0.650] matching product code [26A24AE4-039D-4CA4-87B4-2F03217065FF]
[27-10-2014 05:53:27] [Pre-Installation] Check to see if the _MSIExecute mutex is available. Wait up to [10 minutes] for the _MSIExecute mutex to become available.
[27-10-2014 05:53:27] [Pre-Installation] The _MSIExecute mutex is available.
[27-10-2014 05:53:28] [Pre-Installation] Working Directory is []
[27-10-2014 05:53:28] [Pre-Installation] Executing [msiexec.exe /x "{26A24AE4-039D-4CA4-87B4-2F03217065FF}" REBOOT=ReallySuppress /QN /L*v "C:\windows\Logs\Software\Java7Update65_7.0.650_Uninstall.log"]...
[27-10-2014 05:53:57] [Pre-Installation] Execution complete and the exit code [0] is being ignored
[27-10-2014 05:53:57] [Installation] Working Directory is [C:\Windows\ccmcache\w\Files]
[27-10-2014 05:53:57] [Installation] Executing [C:\Windows\ccmcache\w\Files\jre-8u25-windows-i586.exe /s WEB_JAVA_SECURITY_LEVEL=M /L C:\windows\Logs\Software\Java8U25Setup.log]...
[27-10-2014 05:54:10] [Installation] Execution failed with exit code [1619]
[27-10-2014 05:54:10] [Installation] Oracle_Java_8u25_x86_EN_01 Installation completed with exit code [1619].
[27-10-2014 05:54:11] [Installation] ----------------------------------------------------------------------------------------------------------

Script will follow in next message because it is too long for this one.

I really appreciate your help on this, Thank you.
Oct 27, 2014 at 3:10 PM
Here is the script. It is pretty much one I found here on the forum and it works fine by itself:
<#
remove to fit in forum message

>

Param (
[ValidateSet("Install","Uninstall")] 
[string] $DeploymentType = "Install",
[ValidateSet("Interactive","Silent","NonInteractive")]
[string] $DeployMode = "Interactive",
[switch] $AllowRebootPassThru = $false,
[switch] $TerminalServerMode = $false
)

*===============================================

* VARIABLE DECLARATION

Try {

*===============================================

*===============================================

Variables: Application

$appVendor = "Oracle"
$appName = "Java"
$appVersion = "8u25"
$appArch = "x86"
$appLang = "EN"
$appRevision = "01"
$appScriptVersion = "1.0.0"
$appScriptDate = "10/23/2014"
$appScriptAuthor = "te"

$appguid="{26A24AE4-039D-4CA4-87B4-2F83218025F0}"

*===============================================

Variables: Script - Do not modify this section

$deployAppScriptFriendlyName = "Deploy Application"
$deployAppScriptVersion = [version]"3.2.0"
$deployAppScriptDate = "09/01/2014"
$deployAppScriptParameters = $psBoundParameters

Variables: Environment

$scriptDirectory = Split-Path -Parent $MyInvocation.MyCommand.Definition

Dot source the App Deploy Toolkit Functions

."$scriptDirectory\AppDeployToolkit\AppDeployToolkitMain.ps1"

Handle ServiceUI invocation

If ($serviceUIExitCode -ne $null) { Exit-Script $serviceUIExitCode }

*===============================================

* END VARIABLE DECLARATION

*===============================================

*===============================================

* PRE-INSTALLATION

If ($deploymentType -ne "uninstall") { $installPhase = "Pre-Installation"

*===============================================

# Store number of running browserprocesses to determine if we need to use Show-InstallationProgress
$processCount = (Get-Process iexplore,chrome,firefox -ErrorAction SilentlyContinue)

# If powerpoint is running in presentationmode AND we have running browsers, abort Java upgrade.
#If ((Test-PowerPoint) -and ($processCount.Count -ne $null)) { It turned out that the Test-PowerPoint function doesen't work at the moment, hopefully fixed in future PADT verions.
If ((Get-Process "powerpnt" -ErrorAction SilentlyContinue) -and ($processCount.Count -ne $null)) { #Using this limited workaround until Test-PowerPointfunction works.
Write-Log "Detected Powerpointsession in presentationmode, aborting script with exitcode 5001 to avoid annoyed user."
Exit-Script -ExitCode "5001"
} 

 # Show Welcome Message, close web browsers if required, and verify there is enough disk space to complete the install
Show-InstallationWelcome -CloseApps "iexplore=Internet Explorer,chrome,firefox" -CheckDiskSpace -PersistPrompt -AllowDeferCloseApps -DeferDays "1" -DeferTimes "1" -CloseAppsCountdown "6000"

# Show Progress Message (with the default message) if any browserprocesses were running and Show-InstallationWelcome triggered
If ($processCount.Count -ne $null) {
    Write-Log "Running Show-InstallationProgress"
    Show-InstallationProgress
}

# Remove Application tag from registry
Remove-RegistryKey -Key "HKEY_LOCAL_MACHINE\SOFTWARE\Company\ManagedClient\WSUSCustomUpdates\$appVendor\$appName" 

# Uninstall any previous JRE version
# Remove-MSIApplications "Java(TM) 6 Update"
Remove-MSIApplications "Java 7 Update"

*===============================================

* INSTALLATION

$installPhase = "Installation"

*===============================================

# Perform installation tasks here
# Install Java with .exe
Execute-Process -FilePath "jre-8u25-windows-i586.exe" -Arguments "/s WEB_JAVA_SECURITY_LEVEL=M /L $env:windir\Logs\Software\Java8U25Setup.log" -WindowStyle Hidden -IgnoreExitCodes "3010"

*===============================================

* POST-INSTALLATION

$installPhase = "Post-Installation"

*===============================================

# Perform post-installation tasks here

# Cleanup start menu shortcuts.
Remove-Item -Force -Path "$env:ALLUSERSPROFILE\microsoft\windows\start menu\programs\java\Check For Updates.lnk" -ErrorAction SilentlyContinue
Remove-Item -Force -Path "$env:ALLUSERSPROFILE\microsoft\windows\start menu\programs\java\Configure Java.lnk" -ErrorAction SilentlyContinue

# Uninstall Java Auto Updater to avoid automatic updates on clients.  required because uninstall throws error 1603.
Execute-MSI -Action Uninstall -Path "{4a03706f-666a-4037-7777-5f2748764d10}"

# Create/Recreate Java configurationfiles.
New-Item -force -Path "$env:windir\Sun\Java\Deployment\deployment.properties" -ItemType file -ErrorAction SilentlyContinue
New-Item -force -Path "$env:windir\Sun\Java\Deployment\deployment.config" -ItemType file -ErrorAction SilentlyContinue

# Add configuration to deployment.config.
Add-Content -path "$env:windir\Sun\Java\Deployment\deployment.config" -value "deployment.system.config.mandatory=true" -ErrorAction SilentlyContinue
Add-Content -path "$env:windir\Sun\Java\Deployment\deployment.config" -value "deployment.system.config=file:///$env:SystemDrive/Windows/Sun/Java/Deployment/deployment.properties" -ErrorAction SilentlyContinue

# Add configuration to deployment.properties
Add-Content -path "$env:windir\Sun\Java\Deployment\deployment.properties" -value "deployment.expiration.check.enabled=false" -ErrorAction SilentlyContinue # Disable Java Expiration warning (JRE 7u30+)
Add-Content -path "$env:windir\Sun\Java\Deployment\deployment.properties" -value "deployment.security.mixcode=HIDE_RUN" -ErrorAction SilentlyContinue # Suppress warning dialog if potentially unsafe components are detected.
Add-Content -path "$env:windir\Sun\Java\Deployment\deployment.properties" -value "deployment.security.level=MEDIUM" -ErrorAction SilentlyContinue # Set Java securitylevel to MEDIUM, otherwise unsigned applets won't run.
Add-Content -path "$env:windir\Sun\Java\Deployment\deployment.properties" -value "deployment.security.level.locked" -ErrorAction SilentlyContinue # Lock Java securitylevelslider in Java Controlpanel to prevent users from changing it.
Add-Content -path "$env:windir\Sun\Java\Deployment\deployment.properties" -value "deployment.insecure.jres=NEVER" -ErrorAction SilentlyContinue # Untrusted content will always run with the default JRE
Add-Content -path "$env:windir\Sun\Java\Deployment\deployment.properties" -value "deployment.javaws.shortcut=NEVER" -ErrorAction SilentlyContinue # No Shortcuts  

# Tag registry
Set-RegistryKey -Key "HKEY_LOCAL_MACHINE\SOFTWARE\Company\ManagedClient\WSUSCustomUpdates\$appVendor\$appName" -Name "AppVersion" -Value "$appVersion" -Type String 
Set-RegistryKey -Key "HKEY_LOCAL_MACHINE\SOFTWARE\Company\ManagedClient\WSUSCustomUpdates\$appVendor\$appName" -Name "DeploymentScriptVersion" -Value "$appScriptVersion" -Type String 
Set-RegistryKey -Key "HKEY_LOCAL_MACHINE\SOFTWARE\Company\ManagedClient\WSUSCustomUpdates\$appVendor\$appName" -Name "AppArchitecture" -Value "$appArch" -Type String 
Set-RegistryKey -Key "HKEY_LOCAL_MACHINE\SOFTWARE\Company\ManagedClient\WSUSCustomUpdates\$appVendor\$appName" -Name "AppLanguage" -Value "$appLang" -Type String 
Set-RegistryKey -Key "HKEY_LOCAL_MACHINE\SOFTWARE\Company\ManagedClient\WSUSCustomUpdates\$appVendor\$appName" -Name "DeploymentEngineVersion" -Value "$deployAppScriptVersion" -Type String 

*===============================================

* PRE-UNINSTALLATION

} ElseIf ($deploymentType -eq "uninstall") { $installPhase = "Pre-Uninstallation"

*===============================================

# Show Welcome Message, close Internet Explorer if required with a 60 second countdown before automatically closing
Show-InstallationWelcome -CloseApps "iexplore" -CloseAppsCountdown "60"

# Show Progress Message (with the default message)
Show-InstallationProgress

*===============================================

* UNINSTALLATION

$installPhase = "Uninstallation"

*===============================================

# Perform uninstallation tasks here

*===============================================

* POST-UNINSTALLATION

$installPhase = "Post-Uninstallation"

*===============================================

# Perform post-uninstallation tasks here

*===============================================

* END SCRIPT BODY

} } Catch { $exceptionMessage = "$($_.Exception.Message) ($($_.ScriptStackTrace))"; If (!($appDeployToolkitName)) {Throw "Failed to dot-source AppDeployToolkitMain.ps1 - please check if the file is present in the \AppDeployToolkit folder"; Exit 1}
Else { Write-Log "$exceptionMessage"; Show-DialogBox -Text $exceptionMessage -Icon "Stop"; Exit-Script -ExitCode 1 } } # Catch any errors in this script
Exit-Script -ExitCode 0 # Otherwise call the Exit-Script function to perform final cleanup operations

*===============================================

Oct 29, 2014 at 2:56 AM
I see that you are using the installation .exe

I use the .msi and ,cab file from %userprofile%\appdata\locallow\Sun\Java
It will be present in this location when you start the installer.

I use these lines to cleanup and install:
Remove-MSIApplications "Java(TM) 6 Update"
Remove-MSIApplications "Java 7 Update"
Execute-MSI -Action Install -Path "jre1.7.0_71.msi" -Parameters "/QN JU=0 JAVAUPDATE=0 RebootYesNo=No IEXPLORER=1"
Nov 4, 2014 at 9:43 PM
Awesome. Using the MSI fixed it. Do you know why? Is there something in the Toolkit that prevents using EXE installers?
Thanks for you help on this, I really appreciate it.
Nov 5, 2014 at 4:33 PM
The .exe method worked fine for me in a VBScript wrapper with the same switches.

I have not tried this yet but it might work if we use single quotes to make the string literal.
Execute-Process -FilePath 'jre-8u25-windows-i586.exe' -Arguments '/s WEB_JAVA_SECURITY_LEVEL=M /L C:\Windows\Logs\Software\Java8U25Setup.log' -WindowStyle Hidden -IgnoreExitCodes "3010"