答案 0 :(得分:0)
经过大量研究后,我能找到的最接近的答案是扫描注册表文件夹中的所有可用日志。
对于我在此之后所在的字段:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\
从这里开始,我使用循环来获取文件夹名称。虽然为了获得所有结果,我将不得不扫描它们的子文件夹(这是通过更改路径来完成的。如果其他人发现此问题,下面是一段代码片段。
Function test()
Const HKEY_LOCAL_MACHINE = &H80000002
Dim temp As Object
Dim strComputer As String
Dim rPath As String
Dim arrSubKeys()
Dim strAsk
strComputer = "."
Set temp = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
rPath = "SYSTEM\CurrentControlSet\Services\EventLog\Application"
temp.EnumKey HKEY_LOCAL_MACHINE, rPath, arrSubKeys
For Each strAsk In arrSubKeys
Debug.Print strAsk
Next
End Function