What do you mean by "window variable"? Do you mean a Process Group Variable? If so, you can change it via the UI or REST API (I believe the endpoint is /nifi-api/process-groups/<id>/variable-registry/update-requests). Note that it will stop any affected processors or controller services, then change the variable value, then restart/re-enable the affected components.
If you mean a Flow File attribute, you can add/change/delete those using the UpdateAttribute processor.