Results 1 to 6 of 6

Thread: [2005] Writing to a mapped drive

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    394

    [2005] Writing to a mapped drive

    I have a program that will ran from a mapped drive (at least with most of our clients). The drive is typically on the local machine. For example S:\ will be mapped to C:\myDir. My application create's a file that contains a timestamp of when an event occured.

    If I place my executable in C:\myDir everything runs as expected. Here's the interesting part. If I open a Windows explorer and navigate to the S:\ drive (which is C:\myDir), I get a permissions error when I try to write to my file. I've verified that the permissions on my mapped drive is set to full control.

    Here's the code. Is there something about using streamwriter across networks?

    vb Code:
    1. Private Sub SetTime()
    2.         Try
    3.             dTime = Date.Now
    4.             Using sw As StreamWriter = New StreamWriter(My.Settings.InProgessFile)
    5.                 sw.WriteLine(dTime)
    6.             End Using
    7.         Catch ex As Exception
    8.             MessageBox.Show("SetTime: " & ex.Message.ToString)
    9.         End Try
    10.     End Sub
    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width