ShareX is a free and open-source screenshot and screencast program for Microsoft Windows.
Locate the ApplicationConfig.json file in Documents. Create/Modify an object in the "ExternalPrograms" array. Add the payload in the "Path" and "Args" key values. Set the "IsActive" key value to "true". In the "AfterCaptureJob" key, add the value "SaveImageToFile, PerformActions". Optionally set the "HiddenWindow" key value to "true".
Usecase: Establishing persistence on a Windows host