Author Topic: Pre/Post scripts and Powershell Modules / additional files  (Read 4713 times)

Offline hasselholz

  • Newbie
  • *
  • Posts: 5
    • View Profile
Pre/Post scripts and Powershell Modules / additional files
« on: November 02, 2019, 04:03:15 PM »
Hi folks.

before starting my question, I'd like to say thank you to the PatchMyPC team for the great work and constant improvements you have built into the product. It's an outstanding product that fills a huge gap at a more than resaonable price. 

I am currently evaluating Patch My PC with one of our customers and they quicly fell in love with the pre/post script feature that allows to customize the behavior of setups both for Patches and also applications.

We currently have a lot of Powershell scripts for our application setups, to customize lots of stuff. These Powershell scripts use some Powershell modules, external XML files and many are based on the well known Powershell App Deployment Toolkit that requires a certain file structure in the script directory in order to work.

With PatchMyPC we are planning to entirely skip application packaging for all the products in the PatchMyPC catalog and move our current scripting logic completely to the pre/post script feature of PatchMyPC.

My question is: Is the Pre/post scripting feature of PatchMyPC capable of running more complex scripts that rely on external files or Powershell modules that reside in the script directory? Can we simply copy an existing script along with its modules and maybe subfolders and everything is run by PatchMyPC?

I have not been able to test it out myself yet. Hopefully someone here could provide an answer if this if possible or (if not) is planned to be included soon!

Thank you very much in advance
Regards
Udo

Offline Justin Chalfant

  • Patch My PC Support
  • Administrator
  • Hero Member
  • *****
  • Posts: 2156
    • View Profile
    • Patch My PC Support
Re: Pre/Post scripts and Powershell Modules / additional files
« Reply #1 on: November 02, 2019, 04:54:16 PM »
Hey!

Yeah, so the options to add custom files or folders: https://patchmypc.com/custom-options-available-for-third-party-updates-and-applications#custom-scripts will allow you to include any dependencies in the relative directory of the script to make it work. It can be as flexible as you need.

Hi folks.

before starting my question, I'd like to say thank you to the PatchMyPC team for the great work and constant improvements you have built into the product. It's an outstanding product that fills a huge gap at a more than resaonable price. 

I am currently evaluating Patch My PC with one of our customers and they quicly fell in love with the pre/post script feature that allows to customize the behavior of setups both for Patches and also applications.

We currently have a lot of Powershell scripts for our application setups, to customize lots of stuff. These Powershell scripts use some Powershell modules, external XML files and many are based on the well known Powershell App Deployment Toolkit that requires a certain file structure in the script directory in order to work.

With PatchMyPC we are planning to entirely skip application packaging for all the products in the PatchMyPC catalog and move our current scripting logic completely to the pre/post script feature of PatchMyPC.

My question is: Is the Pre/post scripting feature of PatchMyPC capable of running more complex scripts that rely on external files or Powershell modules that reside in the script directory? Can we simply copy an existing script along with its modules and maybe subfolders and everything is run by PatchMyPC?

I have not been able to test it out myself yet. Hopefully someone here could provide an answer if this if possible or (if not) is planned to be included soon!

Thank you very much in advance
Regards
Udo

Offline hasselholz

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Pre/Post scripts and Powershell Modules / additional files
« Reply #2 on: November 05, 2019, 02:01:10 PM »
This looks great, I haven't seen these options before. Thanks for pointing that out. We will try that and provide feedback ...

Offline [email protected]

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Pre/Post scripts and Powershell Modules / additional files
« Reply #3 on: November 21, 2019, 12:56:31 PM »
hi,
We are busy evaluating as well and I would like if it would be possible to provide an example to add additional folders and add files.
An example could be notepad++ and add an add-on

Offline Justin Chalfant

  • Patch My PC Support
  • Administrator
  • Hero Member
  • *****
  • Posts: 2156
    • View Profile
    • Patch My PC Support
Re: Pre/Post scripts and Powershell Modules / additional files
« Reply #4 on: November 21, 2019, 02:00:57 PM »
Hey,

We don't have any examples as it really depends on what you are trying to do. For Notepad++, I could see adding the plugins as additional files which will add then in the relative path where the script would execute in CCMCache. In the script, you would just have the logic to copy the plugins to the Notepad++ plugins folder in Program Files.

hi,
We are busy evaluating as well and I would like if it would be possible to provide an example to add additional folders and add files.
An example could be notepad++ and add an add-on

Offline [email protected]

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Pre/Post scripts and Powershell Modules / additional files
« Reply #5 on: November 21, 2019, 10:38:00 PM »
Thnx for the fast feedback, will give it a try.

Offline hasselholz

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Pre/Post scripts and Powershell Modules / additional files
« Reply #6 on: November 28, 2019, 04:16:09 AM »
I have tested the function to add files and folders. It works great for files, BUT for folders we have discovered that it is not possible to select a folder on a UNC path. The "Browser For Folder" GUI allows only to select local folders (no chance to input a UNC path). How can we add folders that are on the network then? This is highly important, as we have some larger scripts that rely on modules and several other files that we need to retain during patching.
Seems like a wrong GUI design decision to me, is it?

Offline Justin Chalfant

  • Patch My PC Support
  • Administrator
  • Hero Member
  • *****
  • Posts: 2156
    • View Profile
    • Patch My PC Support
Re: Pre/Post scripts and Powershell Modules / additional files
« Reply #7 on: November 28, 2019, 08:25:15 AM »
Seems to work for us?


Offline Justin Chalfant

  • Patch My PC Support
  • Administrator
  • Hero Member
  • *****
  • Posts: 2156
    • View Profile
    • Patch My PC Support
Re: Pre/Post scripts and Powershell Modules / additional files
« Reply #8 on: November 28, 2019, 11:23:11 AM »
O wait nevermind, I see you are talking about folders. Can you submit a new feature request for this at ideas.patchmypc.com? I see the need here.

Offline Justin Chalfant

  • Patch My PC Support
  • Administrator
  • Hero Member
  • *****
  • Posts: 2156
    • View Profile
    • Patch My PC Support
Re: Pre/Post scripts and Powershell Modules / additional files
« Reply #9 on: November 28, 2019, 05:23:59 PM »

Offline hasselholz

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Pre/Post scripts and Powershell Modules / additional files
« Reply #10 on: November 29, 2019, 04:31:56 AM »
Thanks for pointing the feature request out. I have found out that all the settings are written in the Settings.XML in the PatchMyPC folder. I gave it a try and manually added a folder UNC path in the XML and that setting is actually reflected back in the GUI - see screenshot attached. However I have not yet tested out, if editing the Settings.XML file directly is supported and if the folder inclusion does work by doing it that way.

Offline Justin Chalfant

  • Patch My PC Support
  • Administrator
  • Hero Member
  • *****
  • Posts: 2156
    • View Profile
    • Patch My PC Support
Re: Pre/Post scripts and Powershell Modules / additional files
« Reply #11 on: November 29, 2019, 04:56:32 AM »
That should work ok

Offline hasselholz

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Pre/Post scripts and Powershell Modules / additional files
« Reply #12 on: December 05, 2019, 02:55:35 AM »
Update: The latest PatchMyPC version 1.5.9.0 has fixed this GUI issue. We are now able to select UNC paths via the GUI. Thanks to the team for the quick update!!!