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

Pre/Post scripts and Powershell Modules / additional files

Started by hasselholz, November 02, 2019, 04:03:15 PM

Previous topic - Next topic

hasselholz

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

Justin Chalfant (Patch My PC)

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.

Quote from: hasselholz 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

hasselholz

This looks great, I haven't seen these options before. Thanks for pointing that out. We will try that and provide feedback ...

[email protected]

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

Justin Chalfant (Patch My PC)

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.

Quote from: [email protected] 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

[email protected]


hasselholz

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?

Justin Chalfant (Patch My PC)


Justin Chalfant (Patch My PC)

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.


hasselholz

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.

Justin Chalfant (Patch My PC)


hasselholz

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!!!