title: Check File Exist with different user
body: <p>I have created .exe file to check whether file exist or not on Shared Path..</p>
  
  <p>below is the vb.net code </p>
  
  <p>Here, the issue is..the users who does not have access on mentioned shared path they are not able to check status and they have to run exe with Run As different user id who have access...</p>
  
  <p>Any solution if I can bind credentials inside the code so that everybody can check status..??? </p>
  
  <pre><code>Try
  
  Dim curFile As String = "\\SharedPath\Data\testFile.txt"
      If (File.Exists(curFile) ) Then
          lblFileStatus.Text = "Received"
      Else
          lblFileStatus.Text = "File not Received"
      End If
      Catch ex As Exception
  
  End Try
  </code></pre>