Hi,
I have a weird case with one of our deployments. The application is a Desktop .NET 4 Client Profile Winforms app that is usually started from a network share. During startup, our application does a couple of sanity checks, one of them being checks to see if the directories it requires exist and if the user running the application has write permissions in those folders etc.
The weird thing is that at one deployment only, the initial Directory.Exists check returns false, but subsequent attempts to write files inside that directory work and our application runs just fine.
To make things more interesting: Our users start a small launcher application (from the network share) that in turn starts the most up-to-date version of our program from a subdirectory. The mentioned problem with Directory.Exists returning false happens only if the program is started via the launcher. If the user starts the exe file from the subdirectory directly, then Directory.Exists on those same directories returns true.
The Launcher starts the the versioned executable via a simple Process.Start(exePath, arguments);
The erratic behaviour of Directory.Exists is really puzzling me. Any hints on what might be going on would be much appreciated!
Thanks,
Daniel