Are we able to customize icon rendering procedure in Windows file explorer?

20 Views Asked by At

Is Windows providing APIs or hooks to file icon rendering procedure of explorer.exe that allow us to use any random image as file icon in a programmatical way? Moreover, could we do that for folder icon?

For example, are we able to inject the logic below (use Javascript as example) into that procedure?

// use a function to listen on any file icon rendering event
function onFileIconRendering(fullFilename) // fullFilename, string, e.g., "D://folder1/folder2/file3.exe"
{
  if (fullFilename.includes('1')) return './1.png' // use our own image to replace default icons
  else if (fullFilename.includes('2')) return './2.png'
  // ... more any random logic
}
0

There are 0 best solutions below