Postby kilickerem066 » 06 Mar 2021 10:50
Finally, I have found the solution to fix this on Windows.
Step 1) Make a batch file. Put it in any folder you want (I put it in the Documents folder). After you created a batch file, open it in Notepad (right-click the batch file and select Edit), and type:
@echo off
cd %AppData%\vlc
rmdir art /s /q
exit
Step 2) [Optional] Convert it to an EXE file. Use a batch to exe converter to convert the batch file to an exe. This is optional, but if you want to hide the console window, this can be useful.
Step 3) Enable 'application start' logging. To do this, open Run box (by pressing Win+R), type secpol.msc, click OK. This will open up Local Security Policy. Navigate to Local Policies/Audit Policy, and then double-click Audit Process Tracking. Tick the "Success" box, and then click OK. Now you can close Local Security Policy.
Step 4) Create a task to automatically run batch file after VLC closes. To do this, open Run box again (by pressing Win+R), type taskschd.msc, click OK. This will open up Task Scheduler. Click "Create task..." on the right corner. Give it a name. And then, go to Triggers tab, and then create a new trigger. Make sure to choose "On an event" as the trigger. After that, choose Custom, and then add an event trigger. Change the Filter settings like this:
Choose "By log"
Event logs: Security
Task category: Process Creation
Keywords: Audit Success
Box that will appear that is on top of "Task category": 4689
After changing the settings, go to XML tab, enable "Edit query manually". Click OK if any warning boxes appear. Change the XML to this:
<QueryList>
<Query Id="0" Path="Security">
<Select Path="Security">
*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and Task = 13313 and (band(Keywords,9007199254740992)) and (EventID=4689)]]
and
*[EventData[Data[@Name='ProcessName'] and (Data='C:\Program Files\VideoLAN\VLC\vlc.exe')]]
</Select>
</Query>
</QueryList>
Click OK, and then click OK again. Now go to Action tab, and then create a new action. Action should be "Start a Program", and then click "Browse", and choose batch file that you made in step 1. After that, click OK, click OK again. Now you can close Task Scheduler.
Step 5) Test it! Now, the problem should be fixed. But the batch file will run with 1 second delay, so you should wait about 1 or 2 second(s) after closing VLC.