Working with file system from Event Server background plugin

Hello

My Event Server background plugin needs to store and read it’s files on local disk drive. It requires own folder with Network Service full access permissions (since it runs on Event Service env).

To avoid using custom config with folder path and to avoid setting up and managing permissions for plugin’s folder I am going to use already exist Event Server folder which has required permissions:

[C:\ProgramData\Milestone\XProtect](file:C:/ProgramData/Milestone/XProtect) Event Server

and just create there my own “MyPlugin” folder

Could you help me with this:

- Is that path static for all Event Server installations?

- If no - Is there a way for background plugin to programatically retrieve that path?

ad “Is that path static for all Event Server installations?”

No. You can get quite far using “%PROGRAMDATA%\Milestone\XProtect Event Server”, but you cannot rely on it - in OEM versions of XProtect, the folder name would be different.

ad “If no - Is there a way for background plugin to programatically retrieve that path?”

Unfortunately, “no” again.

FYI, the SDK developers find the request intriguing and there might be something like this available in the future.

Torsten

Thanks for the answer