
Not sure what the cause of this is. Let me know if there are any ideas to solve the issue.
Should I ignore it? Or... What? Dx
Also, the application crashes on other pc's :/
[php]Public Class Form1
Public Function searchDir(ByVal path As String) As List(Of String)
Dim paths As New Stack(Of String)
Dim files As New List(Of String)
paths.Push(path)
While paths.Count > 0
Dim dir As String = paths.Pop
Try
files.AddRange(IO.Directory.GetFiles(dir))
Catch ex As Exception
End Try
Try
For Each s As String In IO.Directory.GetDirectories(dir)
paths.Push(s)
Next
Catch ex As Exception
End Try
End While
Return files
End Function
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If ListBox1.Tex*****ntains("") Then
ButtonX2.Enabled = False
End If
End Sub
Private Sub ButtonX1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX1.Click
For Each file As String In searchDir(ComboBox1.Text + ":/Windows/Prefetch")
ListBox1.Items.Add(file)
Next
If ListBox1.Tex*****ntains("") Then
Label1.Text = ("Select the drive that Windows is installed on")
End If
Label1.Text = ("Gathered prefetch folder contents. Please click 'Clear Prefetch' to finish.")
If ListBox1.Tex*****ntains("") Then
MsgBox("Either Windows is not installed on the selected drive" & vbNewLine & "or the prefetch folder is already cleared.")
End If
End Sub
Private Sub ButtonX2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX2.Click
For Each f As String In searchDir(ComboBox1.Text + ":/Windows/Prefetch")
IO.File.Delete(f)
ListBox1.Items.Clear()
Next
Label1.Text = ("Finished cleaning prefetch folder")
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs ) Handles LinkLabel1.LinkClicked
Process.Start("")
End Sub
Private Sub LinkLabel1_LinkClicked_1(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs ) Handles LinkLabel1.LinkClicked
Process.Start("")
End Sub
End Class
[/php]
Some of the blank ""s are where text would be(removed due to advertising rule)