We are using Nant to deploy an application and need to ensure that a share is created during the process.
We use psexec
and net share
to create the share but this fails and stops Nant if the share already exists.
Is there any way to detect that a share exists already?
Either before trying to create the share or being able to detect the return code of 2
or the The name has already been shared
message from psexec
?
I have tried directory::exists
but this always returns false.
I have tried copying a file to the remote dir and file::exists
but this always returns false.