-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a Custom Action and Detection Functionality #6
base: master
Are you sure you want to change the base?
Conversation
Added functionality for custom actions and detection so you can have the toast display if a script returns a $true It can then build and run a custom protocol. The main goal here is to be able to create flexibility to toast for any custom action. And if desired, build a custom action protocol for that execution. ## Config XML Changes * CustomActions element area. This includes the DetectionScript, Action, and optional ExecutionScript ** If the ExecutionScript is enabled, a new protocol with the Action Name is created. Note that you have to set the Action element to match the named custom action here if you want to use it. ## New Variables * CustomActionsEnabled - Enables/Disables the custom action * CustomDetection - The destection script. * CustomAction - The XML that contains the action name and Script. * CustomActionName - The name of the custom action. ## Functions * Write-FullCustomAction - Writes the action script to the requested directory for the protocol to reference. * Write-FullCustomProtocol - Writes the protocol information into the registry so the action can be called from there. ## New Check * Additional Check for conflicts with custom actions being enabled. ## Misc * Code for determining the results of custom actions, if enabled. * Custom action Toast display section. * modified default toast to not display when custom actions are enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Paul. Great minds thinks alike it seems. I was actually in the process of creating the second action button myself, so you just made that a tad easier. Appreciate the work. I believe you have sent me something previously as well (your name rings a bell). I'm going to merge this into a new release, but I'll do it outside of Git. Thanks again :-)
Yah, I commented in your 1.6 post this spring as I got it ready for my windows servicing this last summer. Some of the same stuff was in that comment (second action) as is in this pull. Now that you have it on GitHub, was much easier to contribute. :-) Been using this updated version for soliciting other updates ahead of time as well. And with the ability of dynamic protocols, I was in heaven! Now I can create a custom protocol for whatever I need. I still have to work on my own blog post for how I used this for servicing to 1909. Very good response from end users. Thank you for sharing this great tool! |
Added functionality for custom actions and detection so you can have the toast display if a detection script returns a $true. It can then build and run a custom protocol (or run an existing protocol).
The main goal here is to be able to create flexibility to toast for any custom action. And if desired, build a custom action protocol for that execution.
Config XML Changes
** If the ExecutionScript is enabled, a new protocol with the Action Name is created. Note that you have to set the Action element to match the named custom action here if you want to use it.
New Variables
Functions
New Check
Misc