Is there a way to write to a locked file regardless of what program/process has it open?
Scenario:
- A commercial product running as a service, locks a log file.
- Service can not be stopped because it will impact customers.
- Would like to inject a line at the end of the file as a marker.
Getting error: The process cannot access the file because it is being used by another process.
Is there ANY way to append a line on a locked file?
Also, afraid of breaking the lock status, as it may cause the commercial program to break.
Originally thinking batch file until finding out log file is locked. Will do powershell or whatever language can pull this off.