Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Passing variables between steps

A repost of this: https://help.pdq.com/hc/en-us/community/posts/211676127-Passing-variables-between-steps-in-a-package-?flash_digest=492de9cc731cc176da9943058e50fc287978261b

Another way to put it is steps should be able to output a value. For instance, I have a package that needs to determine at runtime what files are applicable to the target. The next step should copy those files only. It seems to workaround the inability for steps to communicate, Step 1 writes a file at the end so that Step 2 can read it. Step 2 can not be the built-in File Copy function, but now another PowerShell script.

This allows you to rely more on PDQ rather than combining other external solutions (aka it's more centralized). PDQ has "Error Mode", under the Step's option. Steps can technically communicate. Perhaps this could be extended upon?

1

Comments

1 comment
Date Votes
  • This would be very handy. I'm working on a update notification before the installation of an application. It would be nice if a could set a variable in PowerShell if the process was running before I killed it in a Pre-step and use that variable in a Post-step and only show a 'update complete' notification if the process was running before the update.

    0