【求助】VB.net删除Win7系统帮助文件的问题
WIN7系统帮助文件:
C:\Windows\Help\Windows\en-US
C:\Windows\Help\Windows\zh-CN
我想在程序中删除上面2个文件夹下所有帮助文件,删除不了:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
For Each foundFile As String In My.Computer.FileSystem.GetFiles("C:\Windows\Help\Windows\en-US", FileIO.SearchOption.SearchAllSubDirectories, "*.*")
Try
System.IO.File.Delete(foundFile)
Catch ex1 As Exception
Try
System.IO.File.SetAttributes(foundFile, IO.FileAttributes.Normal)
System.IO.File.Delete(foundFile)
Catch ex2 As Exception
End Try
End Try
Next
End Sub
进去文件夹手动删除时,提示你需要“TrustedInstaller”提供的权限才能对此文件进行更改。
怎样才能在程序中成功删除上面的文件夹呢?求高手帮忙!!
[最优解释]
http://topic.csdn.net/u/20071010/20/ea1397ae-91fb-4b0b-b73e-26b798cc28a4.html
[其他解释]