Page 1 of 1

A native option to delete file on next reboot

Posted: 2009-01-09, 01:40 UTC
by andres992
It would be a nice thing to have a native TC option to delete a locked file on next reboot.

A friend of mine had a rather nasty virus, which copied itself to some pseudo-recycle-bins (paths like C:\RECYCLER\S-1-5-bla-bla\virus.exe) and almost nothing could delete this. Found an app called killbox, which finally did the job, so I could clean the computer manually but still took a lot of searching. Most ordinary unlockers were not able to find or kill the file.

Posted: 2009-01-09, 02:21 UTC
by fenix_productions
2andres992
I can't agree with such proposal because it might give too much troubles.

Example:

Imagine the situation when you've got one PC with multiple accounts (admin and limited user) but one TC configuration.

In such case user can start deleting files and have an error because of limited privileges. Now imagine, that user chooses "Delete on next reboot" option.

What will happen if next system start-up will be taken from admin account?

Either administrator will have to Cancel operation or important files will be deleted. It is easy to accept such task by mistake.

The other pair of boots is the time when deleting should be handled. The most of existing tools do that right after log-in when not all files / drivers / services are loaded. Having such feature should require to start TC (without your interaction) in right time because later files might get locked. Too much place and possibilities to screw something up.

Next thing is: too big system penetration from TC IMHO.

Of course, you might say that existing tools already do that but I think that it's less plausible to break something if you have to download (and use) separate tool. That's because many n00bs don't even know about such possibility but they know how to press F8/Del in TC. "Security through obscurity" is not always so bad.

Posted: 2009-01-09, 11:40 UTC
by sqa_wizard
"Security through obscurity" is not always so bad.
I fully agree.
Don't presume that everyone who uses TC is a professional administrator.

Removing nasty viruses is a task for professionals who now exactly what they are doing !
(keep a backup and may replace instead of just delete)

Posted: 2009-01-09, 18:35 UTC
by MVV
I think it isn't a feature to have in TC. BTW, you almost always can move or rename locked application within logical disk in order to remove it manually on next boot. Or you can make autostarted bat file for cleaning some dir and use this dir to keep files to remove on next boot.

Posted: 2009-01-10, 00:32 UTC
by andres992
I think these arguments are correct and I must agree. Sorry for a rash post.

Posted: 2009-01-10, 18:06 UTC
by gigaman
fenix_productions wrote: Imagine the situation when you've got one PC with multiple accounts (admin and limited user) but one TC configuration.

In such case user can start deleting files and have an error because of limited privileges. Now imagine, that user chooses "Delete on next reboot" option.

What will happen if next system start-up will be taken from admin account?

Either administrator will have to Cancel operation or important files will be deleted. It is easy to accept such task by mistake.
Sorry, but your idea of "deleting on reboot" is rather strange.

Seems that you suppose that Total Commander would have to be started automatically on every system boot to achieve this functionality - but it's certainly not the case. Normally (even though I'm not saying it's effective against active malware) deleting after boot is done using the MoveFileEx API function - with the flag MOVEFILE_DELAY_UNTIL_REBOOT.

Internally, the system writes the files to be moved/removed into a special registry key and performs the operation itself on the next start - under LOCALSYSTEM account. There's no security issue here - the registry key is in HKEY_LOCAL_MACHINE\System hive, so you have to have enough rights to wirte to this key (to use that function); a limited user wouldn't be able to do that anyway.
fenix_productions wrote: The other pair of boots is the time when deleting should be handled. The most of existing tools do that right after log-in when not all files / drivers / services are loaded. Having such feature should require to start TC (without your interaction) in right time because later files might get locked. Too much place and possibilities to screw something up.
Right after login??
That's way too late... the usual way is processed earlier, of course (and it's possible to do even earlier, but that requires special hacks indeed).

Posted: 2009-01-10, 18:23 UTC
by fenix_productions
2gigaman
Thank you for explanation. I was wrong.

I still think it's risky to have it but having INI option to enable/disable such behaviour (or show/hide proper button) could be nice.

Only cow doesn't change opinion, isnt't it? ;)

Posted: 2009-01-11, 01:06 UTC
by andres992
After gigaman's explanation... Well, I am quite new here, and actually not a professional but just an amateur. Therefore, I do not want to argue with professionals, as I do not know all the details.

My line of thought was that since Total Commander is a file manager, it should be able to handle files, even if these files are difficult ones. This option should definitely not be available by default but in emergency cases it could make TC an even more powerful tool, when enabled manually from the INI file, and when it offers a proper warning or even a double warning.

I, for one, would still find it rather useful but I do not know about other users, or the developer's policy and considerations for making TC safe enough for anyone.

Posted: 2009-01-13, 14:23 UTC
by Dark-Star
I'm all for this option, especially since it requires almost zero additional programming (one API call with a specific flag).

TC could pop up this option when an error occured while trying to delete a file. Probably under a "more options" button (like with the copy options).

It should probably ask the user the first time this option is used ("are you sure you really want to do that?" - yes, no, yes and don't ask me anymore)

Posted: 2009-02-02, 08:39 UTC
by Motorocker
Just use utility Unlocker.

Posted: 2009-02-02, 09:08 UTC
by speller2
Agree with gigaman. Think it would very useful feature to add files to system next boot deletion. Because it will be native OS delition not TC )