获取最大日志大小

时间:2015-06-08 20:28:03

标签: windows batch-file

我需要通过CMD从Windows> = 2003获取系统事件(eventvwr.msc)的最大日志大小。

我尝试使用" reg查询HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Eventlog \ Security \ / v MaxSize"但我只需要值和小数。 wevtutil仅适用于Windows 2008。

拜托,我搜索一下,什么都没发现,我知道这很复杂,但我有信心。

谢谢!

1 个答案:

答案 0 :(得分:0)

for /f "skip=2 tokens=3" %A in ('Reg query "HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Security" /v MaxSize') do set doc=%A

如何从注册表中读取内容。

相关问题