Answer the question
In order to leave comments, you need to log in
How to intercept requests to the file system?
Good afternoon!
Interested in writing a program of the following form:
There is a program that polls the file system for the presence of a file, and if it exists, then actions are performed.
The files are requested from the permanent folder. How can you intercept the request, and after creating a certain file, continue execution?
Or just get the details of the request and create the file later.
The program will be needed for Windows XP or 7.
Are there any examples of how to implement this?
In principle, it is possible in any programming language, I think I can master any for this :)
Answer the question
In order to leave comments, you need to log in
for the 2nd version of Process Monitor https://ru.wikipedia.org/wiki/Process_Monitor
https://technet.microsoft.com/ru-ru/sysinternals/b...
Take a look at scriptomatic: https://www.microsoft.com/en-us/download/details.a...
There are many examples of how to set up a watcher for different events in the system. google wmi file watcher
WMI may well skip the request and do nothing.
Take a look at API hooking on Windows.
This is of course not interception, but in Windows there is such a thing as WSH
var fso = new ActiveXObject("Scripting.FileSystemObject");
var filePath = "C:\\test\\123.ogg";
function doSomething() {
WScript.Echo("Файл " + filePath + " существует.");
// Your code here
}
while(true) {
if (fso.FileExists(filePath)) doSomething();
WScript.Sleep(3000); // 3 sec
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question