I am using VB Express in Vista.
How do I get access to the cookies folder? It is marked as hidden and grayed out so I can't change it. I am trying to delete some cookies but it won't let me.
My code for deleting is:
Dim s As String = Front & cookie & ".txt"
My.Computer.FileSystem.DeleteFile(s)
where
s = "C:\Users\Wayne\AppData\Roaming\Microsoft\Windows\Cookies\ads.pointroll.txt"
I am getting a "File not found" error. I know it there because:
Public Sub LoadCookies(ByVal lst As ListBox)
lst.Items.Clear()
Dim di As New DirectoryInfo(System.Environment.GetFolderPath(Environment.SpecialFolder.Cookies))
For Each File As FileInfo In di.GetFiles
If File.Extension = ".txt" Then
Dim re As String = GetFileName(File.Name.ToString)
frmMain.ListCookies.Items.Add(re)
End If
Next
frmMain.Label1.Text = String.Format("Cookies Folder - {0} Items", frmMain.ListCookies.Items.Count)
End Sub
shows all the cookies in the folder.
It does not make sense that everyone on the internet can write to your disk but you can't delete it.