Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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: http://users.csc.calpoly.edu/~bfriesen/software/console.shtml

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.