A
A
a_kirill2015-04-12 19:40:09
Qt
a_kirill, 2015-04-12 19:40:09

WinEvent Logs and QFileSystemWatcher?

I'm trying to add Windows7 event log files to QFileSystemWatcher. However, when added, addPath() throws false.

qDebug() << m_watcher->addPath("C:/Windows/System32/winevt/Logs/Application.evtx"); // false

Moreover, false starts to throw already when adding the winevt folder.
qDebug() << m_watcher->addPath("C:/Windows/System32/winevt"); // false

I looked at the folder attributes - read-only; tried to change - to no avail. After clicking apply, closed-opened, the values ​​​​return to the previous ones.
The documentation says:
Reasons for a watch failure are generally system-dependent, but may include the resource not existing, access failures, or the total watch count limit, if the platform has one.

However, it is not clear how to look at the source of the add error. Maybe someone knows how to deal with this and is there a solution?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
a_kirill, 2015-04-13
@a_kirill

Found a solution .
If you add it through the Sysnative folder as described in the post (see link above), then everything works.
Thanks

D
DancingOnWater, 2015-04-13
@DancingOnWater

Open the file manager through the call "with administrator rights"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question