creato un programma che copia una dll nell' C:\ di un pc il dll e nelle risorse ora quando avvio il programma è clicco sul bottone mi esce questo errore Unauthorizedaccessexception non è stata gestita
il codice è questo
Dim sWriter As IO.Stream = (Me.GetType().Assembly.GetManifestResourceStream("mia.dll"))
Dim x As Integer
Dim fFile As New IO.FileStream("C:\mia.dll", IO.FileMode.OpenOrCreate)
For x = 1 To sWriter.Length
fFile.WriteByte(sWriter.ReadByte)
Next
fFile.Close()
Try
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
|