Yml config files in a different directory

Hi,
I am trying to set the yml config files in my directory in Windows.

I tried
-Des.config="c:\mypath\config"
es.config is no longer supported. elasticsearch.yml must be placed in the config directory and cannot be renamed

I tried
--path.conf="C:\mypath\config"
Unrecognized option, Error Could not create the Java Virtual Machine

What is the proper syntax to do it please?

-Des.path.conf should work

Thank you. It worked.
Is it the same for Kibana and Logstash?

I don't think so