• Welcome to Support Forum: Get Support for Patch My PC Products and Services.
 

Oracle Java Runtime removal script fails but reports success with code 1603!

Started by GeoSimos, May 06, 2025, 03:39:15 AM

Previous topic - Next topic

GeoSimos

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.

GeoSimos

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.

Antony (Patch My PC)

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


Antony (Patch My PC)

Good Morning,

Apologies for the late response, I was not notified by our system that you had replied on the thread.

The same concept applies to the 32-bit version of the script too, if you use the script below it should log correctly when carrying out the tasks.

https://github.com/PatchMyPCTeam/Community-Scripts/tree/main/Uninstall/Pre-Uninstall/Uninstall-Software

Thanks,
Antony