Try to execute
using System.Deployment.Application; ... var dep = ApplicationDeployment.CurrentDeployment; var path = dep.DataDirectory;
It may not be the same as in the DataDirectory path, but one of these properties is almost entirely dependent on what you are looking for.
source share