Quantcast
Channel: Configuration Manager 2012 - Application Management forum
Viewing all articles
Browse latest Browse all 4762

Java Package Issues

$
0
0

Hello,

I'm trying to push out a new Java update in SCCM and I'm using a power shell. Two things I'm having issues with....

1. I get 0% on Compliance even though it has installed on the end user computers.

2. When I go to monitor and deployments and look at Java it shows errors "Message ID 10006" How do you fix this?

Here is the powershell I'm using.

# Script to uninstall and install Java

# Get the script folder
function Get-ScriptDirectory 

    $Invocation = (Get-Variable MyInvocation -Scope 1).Value 
    Split-Path $Invocation.MyCommand.Path 

$scriptFolder = Get-ScriptDirectory

# If there is a previous version installed we need to stop the process

if (Get-Process -Name Java -ea SilentlyContinue) {Stop-Process -Name Java -Force}

if (Get-Process -Name JP2Launcher -ea SilentlyContinue) {Stop-Process -Name JP2Launcher -Force}

if (Get-Process -Name javaw -ea SilentlyContinue) {Stop-Process -Name javaw -Force}

# Now we need to uninstall the old version, Oracle didnt to this right!

$app = Get-WmiObject -Class Win32_Product | Where-Object { 
    $_.Name -match "Java" 
}
foreach ($a in $app) {$a.Uninstall()}

# Install Java
$parameters = "/i " + "$scriptFolder" + "\jre1.8.0_91.msi /quiet"
$installStatement = [System.Diagnostics.Process]::Start( "msiexec", $parameters ) 
$installStatement.WaitForExit()

Viewing all articles
Browse latest Browse all 4762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>