作者shanksponpon (ponpon)
看板Python
标题[问题] Windows Event Log
时间Sun Mar 27 17:27:31 2022
各位大神们好~
以前在写C#的时候,关於Windows内建的Evemt Viewer
我可以创建一个特别的Log Source於Applications And Services Logs中
(如下图所示)
https://imgur.com/a/ZQxjFD9
然後可以写一些String到指定的Log Source内
(如下图所示)
https://imgur.com/a/yonu3Cz
於是我想要在Python上实现一样的功能
但我爬了一下文,可以透过win32evtlogutil.ReportEvent的功能
可以在Windows Logs下的Application的Log中,写一些纪录
且只能在Details的页面中,看到我写的资讯
(如下图所示)
https://imgur.com/a/QpJU9bP
https://imgur.com/a/6mMnrK8
不晓得有没有办法在Python上实现一模一样的功能?
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 220.128.153.169 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1648373253.A.987.html
1F:推 agogoman: AddSourceToRegistry 试试这个method. 04/04 16:45