Author Topic: Pre-Update script occuring after uninstall  (Read 971 times)

Offline quackpatch

  • Newbie
  • *
  • Posts: 28
    • View Profile
Pre-Update script occuring after uninstall
« on: June 26, 2019, 08:19:25 PM »
Hi Justin,

I was hoping to copy out local config prior to our Java8 upgrade however I've noticed the Pre-Update script is also Post-Uninstall - this removes the files before I have the chance to dump them out:

Code: [Select]
Running script: PatchMyPC-Remove-JRE8-32bit-Only.ps1 ScriptRunner 27/06/2019 11:49:43 AM 1 (0x0001)
Running Powershell Script. ScriptRunner 27/06/2019 11:49:43 AM 1 (0x0001)
Exiting With code: 0 ScriptRunner 27/06/2019 11:49:58 AM 1 (0x0001)
Running script: Pre-Update.ps1 ScriptRunner 27/06/2019 11:49:58 AM 1 (0x0001)

This was my workaround in lieu of not having the ability to incorporate additional source files into the update as per this post: https://patchmypc.com/forum/index.php?topic=3034.msg8073#msg8073. I'm wondering if you have any suggestions on how to best approach this, or would I need to raise a feature request to add Pre-Uninstall / Post-Uninstall actions?

Thanks!

Offline Justin Chalfant

  • Patch My PC Support
  • Administrator
  • Hero Member
  • *****
  • Posts: 2062
    • View Profile
    • Patch My PC Support
Re: Pre-Update script occuring after uninstall
« Reply #1 on: June 26, 2019, 10:20:56 PM »
This sounds like a great feature request for our new site :) https://ideas.patchmypc.com/

Essentially, you want any custom pre-update script to run before any Patch My PC Defined scripts right? I don't see any technical reason why we couldn't re-order this flow. One workaround you can do in the meantime is disable the Patch My PC Uninstall script for Java and then just copy the PowerShell script code from our uninstall script into your custom pre-update PowerShell script.

Justin

Hi Justin,

I was hoping to copy out local config prior to our Java8 upgrade however I've noticed the Pre-Update script is also Post-Uninstall - this removes the files before I have the chance to dump them out:

Code: [Select]
Running script: PatchMyPC-Remove-JRE8-32bit-Only.ps1 ScriptRunner 27/06/2019 11:49:43 AM 1 (0x0001)
Running Powershell Script. ScriptRunner 27/06/2019 11:49:43 AM 1 (0x0001)
Exiting With code: 0 ScriptRunner 27/06/2019 11:49:58 AM 1 (0x0001)
Running script: Pre-Update.ps1 ScriptRunner 27/06/2019 11:49:58 AM 1 (0x0001)

This was my workaround in lieu of not having the ability to incorporate additional source files into the update as per this post: https://patchmypc.com/forum/index.php?topic=3034.msg8073#msg8073. I'm wondering if you have any suggestions on how to best approach this, or would I need to raise a feature request to add Pre-Uninstall / Post-Uninstall actions?

Thanks!

Offline quackpatch

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Pre-Update script occuring after uninstall
« Reply #2 on: June 26, 2019, 11:00:43 PM »
Cheers Justin - PATCHMYPC-I-177 posted: https://ideas.patchmypc.com/ideas/PATCHMYPC-I-177