vb.net express 2010 File Access!?

Patrick B

New member
I have a basic tune up program, you know, defragment, empty recycling bin etc
And I have a file I want to save settings to as strings

here is the snippet:
Public Sub Save()
If FileIO.FileSystem.FileExists("C:\Tuneup
.Settings") = False Then
IO.File.Create("C:\Tuneup.Settings")
End If
Dim oWrite As System.IO.StreamWriter
oWrite = My.Computer.FileSystem.
OpenTextFileWriter("C:\Tuneup.
Settings", True)
oWrite.WriteLine(SettingsToSave)
oWrite.Close()
End Sub

But when I run it says that I don't have permission?!
please could someone give me the corrected code. Thanks in advance
 
Back
Top