Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I uninstall something, often the uninstaller would say, "so-and-so files will be deleted when you restart". Naively I presume the uninstaller leaves Windows instructions somewhere to do this.

How do I manually add files to this list of files to be deleted? (Also, will this trick work with what versions of windows?) And, can I use the trick for folders?

This has nothing to do with DeepFreeze, Windows SteadyState, Norton GoBack or Norton Ghost.

share|improve this question
up vote 2 down vote accepted

Microsoft has a "SysInternals" tool to do this, MoveFile. If you specify "" as the destination, it will not be moved but deleted. Works on all recent Windows versions (Microsoft refuses to acknowledge Windows 2000's existance, but it works there too).

share|improve this answer
Ah there! Thanks! Question, @MSalters: Instead of downloading and running MoveFile.exe can I just add lines to the HKLM\System\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations registry entry instead? (Gonna try it now....) – William C Jan 10 '12 at 10:40
I note that this also works for deleting given empty folders. Alright. – William C Jan 10 '12 at 10:42
@WilliamC: If you want to do it programatically, the proper way is to call MoveFileEx. However, the key is documented, so you could. To prevent race conditions, when modifying the key you'll have to do so in a transaction (which requires Vista or later - hence te advice to use MoveFileEx) – MSalters Jan 10 '12 at 13:53

BusyDelete (BDel) will do it for you:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .