UnauthoriuzedAccessException when trying to delete some files in Temporary file
<p>I'm trying to delete some files in Temporary folder (C:\Windows\Temp), but when i try to debug it, it shows as follow:</p>

<p>I have used Try Statement, but it didin't delete</p>

<pre><code>Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Btn_Exit.Click

    Try
      'Deletes the temporary file, then exit.
        Delete(Prepare.CorePath)
        Application.Exit()
    Catch ex As Exception
        Application.Exit()
    End Try

End Sub
</code></pre>

<p>Anyone could help or explaining the situation?
PS: I have elevated the app., and it didn't work too.</p>