Tuesday, December 6th 2005

Removing an empty exe-file from the Windows desktop

Some time back I created an empty text-file on my desktop, and renamed it .exe – all in the name of science. I simply wanted to see what would happen if I tried running it. Well obviously, nothing but an error message happened when I tried running it. But then I wasn’t able to delete it. For some reason the fake .exe was blocked, or used, by some process.

After doing a fail-safe boot and trying again, as well as booting into Ubuntu and trying to delete it from there, I gave up.

Today I noticed the file lying there and got really annoyed by it again. (More annoyed than usual, that is.) After googling for a while I found this solution:

  1. Start the command prompt, either from the programs menu or by clicking [Start] > [Run] “cmd”.
  2. Start the task manager by pressing Ctrl+Shift+Esc.
  3. Shut down explorer.exe from the “Processes” tab.
  4. In the command-line, type (something like) the following two lines:
    cd c:documents and settingsdavid naylordesktop
    del filename

A piece of cake – if you only know what to do! Actually, it’s a bit embarrasing that I couldn’t figure this one out by myself… 🙂

No Responses to this post:

  1. Wladimir Palant says:

    Unfortunately, this doesn’t work for me. I can’t delete the file nssckbi.dll from my old Mozilla tree, not even with this trick. Nobody holds the file, it is simply unremovable 🙂

  2. David Naylor says:

    That’s weird. Have you tried closing all closable processes? 🙂

  3. Wladimir Palant says:

    Sure I did (and http://sysinternals.com/utilities/handle.html would have shown it anyway). Anyway, KillBox (http://www.bleepingcomputer.com/files/killbox.php) was able to remove the file on reboot, problem solved. If something was holding this file, then it was probably the NTFS driver itself…

  4. ditopu says:

    Helped me to delete an empty cmd.exe file, but these actions made my windows to freeze.