Tuesday, November 13, 2018

Wfa Setup Workflow Generator

If you create advanced workflows, you might have the need to upload you own files. Typically modules, or some config files. Modules need to be copied tot the \posh\modules directory. Other files you might want to copy to the WFA root directoy or maybe just a custom directory. That means that you need to create a setup manual saying where the customer should copy the files you provide.

But why not just create a workflow that does this for you. it can be done, if the content is limited in size (Max 2MB).



The idea is this : in a workflow we can embed help files. Typically some html files and some images. These are part of the dar file of the workflow. If you import the dar file, these help files are nicely copied along in a fixed directory and using the workflow guid. So if we can zip our files, rename that zip to setup.jpg for example, we can have our custom files/modules copied along during the import of the dar.

The only thing left is then to tell the customer to run your setup workflow that will grab that jpg (actually a zip file) file and unzip it into the modules,wfa or custom directory.

I've done it before with my PSWord/PSExcel installer, but it's a bit of a messy process to get it processed. So I figured, let's create a powershell script that does it for you :).

Actually, it's a powershell module.  So you import the module and you gain 2 cmdlets

  • New-WfaSetupWorkflow
  • Update-WfaSetupWorkflow
The first will create you a ready-to-go dar file.
The second allows you to update your files in an existing setup dar file and update the version.

No comments :

Post a Comment