Support Forum: Get Support for Patch My PC Products and Services

Commercial Products: Support for Our Enterprise Product for Microsoft ConfigMgr and Intune => Commercial/Paid Products: Support and General Questions (ConfigMgr and Intune) => Topic started by: GeoSimos on May 06, 2025, 03:39:15 AM

Title: Oracle Java Runtime removal script fails but reports success with code 1603!
Post by: GeoSimos on May 06, 2025, 03:39:15 AM
Hello PMPC Team,

Lately, I had to use the custom apps functionality, to create a previous version of Oracle's Java Runtime and target it to a specific group of devices.
As I was working on it, I thought as a good idea to use the removal script you included in the PMPC apps and I did.
However, I saw the following behavior, while the removal script kicked in, it found the newer JRE version and started removing it but, because there were jp2launcher.exe processes running, it was failing with error 1603.
The script though was stating incorrectly:
Starting log for JRE removal for Patch My PC
Now removing Java 8 Update 441 using command {77724AE4-039E-4CA4-87B4-2F32180441F0}
Now building the MSI arguments for start process
Now submitting the following arguments to start-process using MSIExec.exe /x {77724AE4-039E-4CA4-87B4-2F32180441F0} /qn /L*v "C:\Windows\Temp\PatchMyPC-Java 8 Update 441.log" REBOOT=REALLYSUPPRESS
The application was uninstalled with Exit Code: 1603
The application has been succesfully removed
Starting log for JRE removal for Patch My PC
Now removing Java 8 Update 441 using command {77724AE4-039E-4CA4-87B4-2F32180441F0}
Now building the MSI arguments for start process
Now submitting the following arguments to start-process using MSIExec.exe /x {77724AE4-039E-4CA4-87B4-2F32180441F0} /qn /L*v "C:\Windows\Temp\PatchMyPC-Java 8 Update 441.log" REBOOT=REALLYSUPPRESS
The application was uninstalled with Exit Code: 1603
The application has been succesfully removed
In SCCM's monitoring, the failure is reported correctly, also makes me wonder how the installation kicks in, when the jp2launcher.exe process is running.
Title: Re: Oracle Java Runtime removal script fails but reports success with code 1603!
Post by: GeoSimos on May 06, 2025, 06:19:02 AM
Quote from: GeoSimos on May 06, 2025, 03:39:15 AMHello PMPC Team,

Lately, I had to use the custom apps functionality, to create a previous version of Oracle's Java Runtime and target it to a specific group of devices.
As I was working on it, I thought as a good idea to use the removal script you included in the PMPC apps and I did.
However, I saw the following behavior, while the removal script kicked in, it found the newer JRE version and started removing it but, because there were jp2launcher.exe processes running, it was failing with error 1603.
The script though was stating incorrectly:
Starting log for JRE removal for Patch My PC
Now removing Java 8 Update 441 using command {77724AE4-039E-4CA4-87B4-2F32180441F0}
Now building the MSI arguments for start process
Now submitting the following arguments to start-process using MSIExec.exe /x {77724AE4-039E-4CA4-87B4-2F32180441F0} /qn /L*v "C:\Windows\Temp\PatchMyPC-Java 8 Update 441.log" REBOOT=REALLYSUPPRESS
The application was uninstalled with Exit Code: 1603
The application has been succesfully removed
Starting log for JRE removal for Patch My PC
Now removing Java 8 Update 441 using command {77724AE4-039E-4CA4-87B4-2F32180441F0}
Now building the MSI arguments for start process
Now submitting the following arguments to start-process using MSIExec.exe /x {77724AE4-039E-4CA4-87B4-2F32180441F0} /qn /L*v "C:\Windows\Temp\PatchMyPC-Java 8 Update 441.log" REBOOT=REALLYSUPPRESS
The application was uninstalled with Exit Code: 1603
The application has been succesfully removed
In SCCM's monitoring, the failure is reported correctly, also makes me wonder how the installation kicks in, when the jp2launcher.exe process is running.
Regarding the auto close of the processes, I hadn't enabled the conflicting processes options for the custom apps, that means that if it was enabled, that issue wouldn't happen. However, it doesn't negates the erroneous report in the log file.
Title: Re: Oracle Java Runtime removal script fails but reports success with code 1603!
Post by: Antony (Patch My PC) on May 06, 2025, 06:47:51 AM
Good Afternoon,

It appears you are using our PatchMyPC-Remove-JRE8-64bit-Only.ps1 script which removes all Java 8's. This is why you are seeing this behaviour in the logs.

Could you please use the script found at the following link instead? https://github.com/PatchMyPCTeam/Community-Scripts/tree/main/Uninstall/Pre-Uninstall/Uninstall-Software

Thank you,
Antony
Title: Re: Oracle Java Runtime removal script fails but reports success with code 1603!
Post by: GeoSimos on May 06, 2025, 09:28:22 AM
Hi Antony,

I used this one as it was set in the 32-bit JRE "https://patchmypc.com/scupcatalog/downloads/scripts/PatchMyPC-Remove-JRE8-32bit-Only.ps1".