I've been building a demo for Windows XP Embedded Service Pack 2 Feature Pack 2007 - the demo boots a custom C# .NET Framework 2.0 application as the custom shell - the application displays images from a folder (like an electronic picture frame) and can also delete some of the images (to restore to factory defaults) - the files wouldn't delete on the device, so I needed to determine what was going on...

My guess was that the files were being kept open by something (probably my custom shell application) - I downloaded ProcExplorer from Sysinternals (see below).

Process Explorer Screenshot

ProcExplorer is an excellent diagnostic tool that gives you the ability to examine which processes are running, the cpu load (just like TaskMan), but also shows which files and registry keys are being used by the application.

Turns out I wasn't Disposing of a Bitmap object in my applicaiton which was keeping the file open, and therefore the file couldn't be deleted.

- Mike