I have a c# application A that starts another c# application B like so:
string baseDir = AppDomain.CurrentDomain.BaseDirectory;
string path = baseDir + "Programs\\Logging\\";
Process logger = new Process();
logger.StartInfo.FileName = System.IO.Path.Combine(path, "Logger.exe");
logger.Start();
In the Logger.exe I do the following:
string dir = Directory.GetCurrentDirectory();
But it tells me that dir is the directory of the original program A that launched it, not its own directory (Programs\Logging)
Why is this??