I am using following code to get a directory of files with a particular extension. It throws an error that you donot have administrator privileges. Please advise how to fix it.
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim di As New DirectoryInfo("c:\")
Dim files() As FileInfo = di.GetFiles("*.abc", SearchOption.AllDirectories)
End Sub
End Class