Hi,

Am trying to check if a remote directory exists.
my string has a path "\1.1.1.1\XYZ", 1....1 being the IP address of the computer am trying to connect to,
But Directory.Exists(stringPath) returns true when I debug the application and the same code returns false from the setup exe.

Note : sharing and security for the remote folder has been given full access control.

Any help appreciated.
Thanks.

my string has a path "\1.1.1.1\XYZ", 1....1 being the IP address of the computer am trying to connect to,

It appears that your path string may be malformed. Also, you may have to add the hidden adinistrative share name to the path.

For example, try either one of the following in your app..

string stringPath = "\\\\1.1.1.1\\c$\\XYZ";

string stringPath = @"\\1.1.1.1\c$\XYZ";

The C$ is the hidden administrative share name for the C drive. D$ would be the hidden administrative share name for the D drive etc.

So, in the above example, you are trying to determine whether or not C:\XYZ exists on the remote computer.