Eraser's Context Menu "Erase Recycle Bin" Has Slig

  • Thread starter Thread starter Anonymous
  • Start date Start date
A

Anonymous

Guest
Hello.

I noticed a "problem" with using the right-click context menu item "Erase
Recycle Bin" of Eraser.

Seems that Eraser deletes the desktop.ini file inside the Recycle Bin, thus
converting the Recycle Bins which appear on various dive partitions (C:, D:,
E, etc.) to a normal folders.

The fix to return the recycle bin folder(s) to a true Recycle Bin(s) is to
drop a file into the Desktop Recycle Bin and delete it using the Windows
"Empty Recycle Bin" command from the right-click context menu.

This has to be repeated every time you use the Eraser "Erase Recycle Bin"
command to restore the "corrupted" Recycle Bin(s).

Is there a parameter that can be added to the following registry value
(which is created by Eraser during installation) that will make Eraser
ignore the Desktop.ini file:

"D:\Program Files\Eraser\eraserl.exe" -recycled -results

I know I could just use Eraser to delete individual files instead of sending
them to Recycle Bin first, but its easier/quicker to build up a few files in
the Bin and to use Eraser just once than to have to use it each time a
single file is erased.

By the way, is erasing the Recycle Bin's desktop.ini file considered more
secure and that's why no mechanism to avoid erasing this file was
implemented? I can't see that there is really any info in the desktop.ini
file about the contents or previous contents of the Recycle Bin. Even if so,
maybe there should be an option for the user to decide what to do with this file
to avoid "screwing" up the Recycle Bins.


Thanks for your help.
 
Re: Eraser's Context Menu "Erase Recycle Bin" Has

Recycle Ben said:
Seems that Eraser deletes the desktop.ini file inside the Recycle Bin
If you run the command eraserl.exe -recycled, it won't erase the desktop.ini file. You can verify this by looking at the source code file "Launcher.cpp". Are you sure you didn't mistakenly select "Erase" from the popup menu instead of "Erase Recycle Bin"?
 
Don't know about "launcher.cpp, but I do know I didn't select the wrong option.

How do I know this? Because there is only one option for Eraser when you right-click on the Recycle Bin, and that option is "Erase Recycle Bin".

Plus, I repeatedly tested my theory before I posted. This wasn't a one shot mistake. The process I described in my original post is infinitely repeatable: Use the Eraser menu option and screw up Recycle Bins, Fix Recycles Bins, Use the Eraser menu option and screw up Recycle Bins, ad infinitum.

I could be wrong about the Windows file that Eraser is messing up (as opposed to the way the normal "Empty Recycle Bin" option functions), but I'm pretty sure the "critical file" is the \recycle bin\desktop.ini.

Thanks for the reply.
 
I just downloaded the Eraser source code from Source Forge and I checked the launcher file you mentioned. I do see several references to the recycle bin desktop.ini file which might suggest that the authors of Eraser (correctly) intended to have Eraser skip the desktop.ini file when invoking the "Erase Recycle Bin" command from the context menu. Here is one example from the source code:

// parse contents of the Recycle Bin folders except for the "desktop.ini"
// files


You can also see from the registry entry I provided in the first post that the context command does indeed call the Eraser file with the recycle bin parameter, which you suggest does not (or could not) erase the desktop.ini file. I'm guessing you only presume that from the source code that you have seen.

However, I ran the same tests again to see if desktop.ini gets deleted after using the Eraser context menu item "Erase Recycle Bin", and it does.

Here are the results of a DOS check for the existence of the desktop.ini file before using Eraser, after using Eraser, then again after restoring the desktop.ini file with the technique I described in my first post:


****Before running Eraser command "Erase Recycle Bin" - note the *.ini file exists:

C:\>dir c:\recycled\ /a

Volume in drive C has no label
Volume Serial Number is 38DB-DE5D
Directory of C:\RECYCLED

. <DIR> 06-15-03 11:22p .
.. <DIR> 06-15-03 11:22p ..
DESKTOP INI 65 06-22-03 7:12a desktop.ini
1 file(s) 65 bytes
2 dir(s) 586,166,272 bytes free

*****After running Eraser command "Empty Recycle Bin" - note the *.ini file is not found, i.e 0 files in directory:

C:\>dir c:\recycled\ /a

Volume in drive C has no label
Volume Serial Number is 38DB-DE5D
Directory of C:\RECYCLED

. <DIR> 06-15-03 11:22p .
.. <DIR> 06-15-03 11:22p ..
0 file(s) 0 bytes
2 dir(s) 586,186,752 bytes free


*****After restoring the desktop.ini file - note the file has returned

C:\>dir c:\recycled\ /a

Volume in drive C has no label
Volume Serial Number is 38DB-DE5D
Directory of C:\RECYCLED

. <DIR> 06-15-03 11:22p .
.. <DIR> 06-15-03 11:22p ..
DESKTOP INI 65 06-22-03 10:43a desktop.ini
1 file(s) 65 bytes
2 dir(s) 586,178,560 bytes free

*****The results were the same for drives D,E,F,G, & I, which all were converted to plain folders simultaneously when using the context menu command of Erase on the Desktop Recycle Bin.

So, despite appearances of the source code and your insistance that it can't possibly delete the file, may "experiment" proves that it can and does.

I'm not sure what the source code actually does, because I don't know the language well enough to follow it. But even with the plain English parts that can be understood which suggest that there mmay have been an attempt to exclude the desktop.ini file, something didn't work out quite right.

Thanks.
 
Recycle Ben said:
there mmay have been an attempt to exclude the desktop.ini file, something didn't work out quite right.
Works for me, and I believe I tested this on several platforms. Maybe you could provide a bit more information about yours?
 
I'm running Eraser 5.6 on Win 98 with all the latest patches, service packs, etc.

I did a little digging into something I should have dug into in the first place...the manual.

Here's a quote:

"On older systems, the Recycle Bin may show wrong icon after erasing until the next time you open it or delete a file."

The manual does not mention the cause of the disappearing icons, but I hope you will recognize that the common cause for disappearing Recycle Bin icons is deletion of the desktop.ini file and this combined with the previous info I provided should lead you to only one conclusion: Eraser can and does delete the \recycled\desktop.ini files(s), at least on "older" systems. I guess the reference to "older systems" means everything but XP (i.e. Win 95/98/ME)?

Anyway, easy enough to dispute me despite providing what I thought was a thoughtful proof of the events as they occurred. Not so easy to dispute the manual.

Sorry to be so blunt, but I felt like I was pointing out that grass was green, only to be told that it was purple. Very frustrating. :)
 
Just tested on a Win XP Home Edition machine with system / hidden folders set to appear in Windows Explorer.

The Recycle Bins on each of the 5 partitions on that machine remained intact after using Eraser on the Desktop Recycle Bin. A check from the command prompt also indicated that the *.ini files were left intact also (I didn't expect them to be gone since the appearance of Recycle Bins didn't change, but I just wanted to be thorough).

So, it appears that it is an issue with Eraser installed on a Win 98 machine.

It's really not a big enough deal for me to pursue any further. I just thought there might be an "exclude file" switch that could be added to the command to prevent Eraser from deleting specific files, in this case, the desktop.ini file. I take it from the other responses in the thread that this is probably not available, so I'll just call it quits. Or maybe I'll just upgrade the Win 98 machines to XP. :)
 
The manual does not mention the cause of the disappearing icons
Not disappearing icons, but a wrong icon. Older versions of Windows shell don't provide SHEmptyRecycleBin API, which would allow Eraser to notify the shell of the current Recycle Bin status. Instead, the icon was updated only when the Recycle Bin was opened the next time.
I guess the reference to "older systems" means everything but XP
No, it means Windows 95 and Windows NT 4.0 without Internet Explorer 4.0 or newer.
Eraser can and does delete the \recycled\desktop.ini files(s), at least on "older" systems.
When I wrote the code, I tested it on Windows 95 and NT 4.0, where "desktop.ini" files weren't deleted.
Not so easy to dispute the manual.
I also wrote the manual.
So, it appears that it is an issue with Eraser installed on a Win 98 machine
I still cannot reproduce this, even on older versions of Windows. Have you tried reinstalling Eraser?
 
I felt like I was pointing out that grass was green, only to be told that it was purple
Sorry, I only meant to imply that the problem might be with your installation instead of the program, because it does work for me.
 
Firstly, bad choice of words when I said "disappearing icons", but in the context of the other posts I made, I believe it was evident that I meant the Recycle Bin icon disappeared and was replaced with a standard folder on the drive partitions (the Desktop Icon was OK). Here's a quote from my first post:

Seems that Eraser deletes the desktop.ini file inside the Recycle Bin, thus converting the Recycle Bins which appear on various drive partitions (C:, D:, E, etc.) to normal folders.

I now understand that this is still different from your meaning in the manual and that the manual was referring to simply an inability of the Recycle Bin status (Full/Empty) to update immediately after using Eraser. Is this correct? That in itself is no big deal and may not have even been worth mentioning in the manual.

And, I was not originally aware that you were the author of the program, but when I installed the program on the XP machine to test, I saw your name (didn't think there could be that many Samis :)). I congratulate you on creating a very useful program. However, that doesn't change the fact that I wanted to pursue what I found to be a "bug", which I'll concede for now may only occur on my installation. I will point out, however, that all other behavior of the Recycle Bin is normal when not using Eraser to delete items from it (e.g., the icon state updates on all partitions, etc.). And I have not noticed any other erratic behavior from other parts of the OS - it is very stable as WIN98 goes.

Now, back to the current situation:

As you suggested, I uninstalled Eraser then reinstalled. I did this via the provided uninstall program then checked the registry and file system for any leftovers. After making sure the system was as clear as it could be of Eraser remnants, I reinstalled Eraser.

After the reinstall, I get the same results. Recycle Bins ([drive]:\recycled) on partitions which originally used the Recycle Bin Icon (Full/Empty Icon depending on state) are converted to plain folders. The folders can be converted back to the RB icons by deleting something from the Desktop Recycle Bin again.

Although I said this really isn't that important (and it isn't), I was curious enough to capture registry activity and file system activity during Eraser's "Erase Recycle Bin" process. The logs were obviously several thousand lines long just for the deletion of a single file from the Recycle Bin, so I opened them in Excel and extracted what I thought might be relevant to my point: that Eraser (on my system) is deleting the desktop.ini file(s) from the Recycle Bin, thus causing the loss of Recycle Bin properties on the partion Recycle Bins (this results here are essentially the same as showing the before and after existance of the *.ini files using the screen prints of the DOS command as I did in a previous post, but here you can actually see the process which caused the deletion.

The logs show:

Eraser accessing the proper registry entry for the "Erase Recycle Bin" command:

RegMon 1
8:32:43.341 AM
Explorer:FFFE7BFB
QueryValueEx0xC29A82D\shell\Erasext\command SUCCESS
D:\Program Files\Eraser\eraserl.exe" -recycled -results"

Eraser opening the file that needs to be erased from Recycle Bin -

FileMon 1292
8:32:46.400 AM
Eraserl:FFE6A9FF
Open
C:\RECYCLED\DC0.TXT
SUCCESS
OPENEXISTING READONLY DENYNONE

Eraser deleting the file needing to be erased -

FileMon 1365
8:32:46.415 AM
Eraserl:FFE6A9FF
Delete
C:\RECYCLED\DC0.TXT
SUCCESS

Eraser opening and then deleting each of the partition's \recycled\desktop.ini file (also opening/deleting the INFO2 file from C:\RECYCLED) -

FileMon 2090
8:32:47.390 AM
Eraserl:FFE6A9FF
Open
C:\RECYCLED\DESKTOP.INI
SUCCESS
OPENEXISTING READONLY DENYNONE

FileMon 2166
8:32:47.430 AM
Eraserl:FFE6A9FF
Delete
C:\RECYCLED\DESKTOP.INI
SUCCESS

FileMon 2172
8:32:47.495 AM
Eraserl:FFE6A9FF
Open
C:\RECYCLED\INFO2
SUCCESS
OPENEXISTING READONLY DENYNONE

FileMon 2178
8:32:47.495 AM
Eraserl:FFE6A9FF
Delete
C:\RECYCLED\INFO2
SUCCESS

FileMon 2191
8:32:47.575 AM
Eraserl:FFE6A9FF
Open
D:\RECYCLED\DESKTOP.INI
SUCCESS
OPENEXISTING READONLY DENYNONE

FileMon 2249
8:32:47.590 AM
Eraserl:FFE6A9FF
Delete
D:\RECYCLED\DESKTOP.INI
SUCCESS

FileMon 2261
8:32:47.595 AM
Eraserl:FFE6A9FF
Open
E:\RECYCLED\DESKTOP.INI
SUCCESS
OPENEXISTING READONLY DENYNONE

FileMon 2319
8:32:47.610 AM
Eraserl:FFE6A9FF
Delete
E:\RECYCLED\DESKTOP.INI
SUCCESS

FileMon 2329
8:32:47.615 AM
Eraserl:FFE6A9FF
Open
F:\RECYCLED\DESKTOP.INI
SUCCESS
OPENEXISTING READONLY DENYNONE

FileMon 2387
8:32:47.625 AM
Eraserl:FFE6A9FF
Delete
F:\RECYCLED\DESKTOP.INI
SUCCESS

FileMon 2399
8:32:47.630 AM
Eraserl:FFE6A9FF
Open
G:\RECYCLED\DESKTOP.INI
SUCCESS
OPENEXISTING READONLY DENYNONE

FileMon 2457
8:32:47.645 AM
Eraserl:FFE6A9FF
Delete
G:\RECYCLED\DESKTOP.INI
SUCCESS

FileMon 2469
8:32:47.650 AM
Eraserl:FFE6A9FF
Open
H:\RECYCLED\DESKTOP.INI
SUCCESS
OPENEXISTING READONLY DENYNONE

FileMon 2527
8:32:47.660 AM
Eraserl:FFE6A9FF
Delete
H:\RECYCLED\DESKTOP.INI
SUCCESS

FileMon 2539
8:32:47.665 AM
Eraserl:FFE6A9FF
Open
I:\RECYCLED\DESKTOP.INI
SUCCESS
OPENEXISTING READONLY DENYNONE

FileMon 2607
8:32:47.680 AM
Eraserl:FFE6A9FF
Delete
I:\RECYCLED\DESKTOP.INI SUCCESS

The first line of each of the blocks of captured data (e.g. FileMon 2607) indicates the program that captured the data and the sequence number of the captured data. The time stamp is also provided (to milliseconds) as reference.

Don't know if this helps you understand the situation any better, but thought it mighty be interesting o you.

Thanks. And by the way, I guess there is one difference in knowing that I'm dealing with the author of the program, and that's I don't mind so much being told that the grass is purple, if you say so.:)
 
Recycle Ben said:
the manual was referring to simply an inability of the Recycle Bin status (Full/Empty) to update immediately after using Eraser. Is this correct?
Yes, that's what I meant.
Eraser (on my system) is deleting the desktop.ini file(s) from the Recycle Bin
I realize that, but I still don't see a problem in the relevant part of the Eraser source code. One would have to run the program in a debugger on your system in order to see what is going on there.

Anyway, assuming that nothing really strange is happening, my first suspect would be the Windows FindNextFile API. The "desktop.ini" file cannot get erased unless invalid information is returned from a call to FindNextFile, causing the subsequent call to _stricmp fail ("Launcher.cpp", line 108) and the "desktop.ini" file to slip through. However, I cannot confirm this suspicion, because I cannot reproduce the problem.
As you suggested, I uninstalled Eraser then reinstalled
If you want, you could try Eraser 5.3 as well, and see if the same thing happens.
 
Thanks for the suggestion.

But, I tried 5.3 which yielded the same results as 5.6.

By the way, I noticed during my manual uninstall cleanup of version 5.6 (prior to installing 5.3) that Heidi refers to version 5.6 as version 5.5 in the registry entries it installs (and which its uninstall program leaves behind). I checked those entries again after reinstalling 5.6 (I downloaded a fresh copy to make sure I had the latest version) and the registry references were indeed installed as 5.5. Has no bearing on my issue, but it kind of threw me when I first saw the reference...I was concerned that I had mispoken when I claimed here to have had 5.6 installed.

Thanks for all your help.
 
Recycle Ben said:
But, I tried 5.3 which yielded the same results as 5.6.
Yes, that was expected. I just wanted to rule out any compiler problems. Well, unless you want to try reinstalling the operating system, I am out of suggestions. Sorry.
Heidi refers to version 5.6 as version 5.5 in the registry entries it installs (and which its uninstall program leaves behind).
It seems that the registry key strings (in "Eraser.cpp" and "EraserDll.h") haven't been updated after 5.5.
 
Nah. I don't think I'll go the OS reinstall route on this PC. Everything else is working just fine. I'll reply back periodically if I have anything different to report.

Way O.T. - I saw your website and noticed the photography reference. I use Canon system also (film) - EOS 3 with several L lenses. Also shoot with Mamiya RZ Pro II. Waiting for digital to get up to about 19 megapixels for 35mm equivalent, then I'll switch. :) It'll take a lot more than that for the med. format camera (several digital backs are available for the Mamiya RZ - $10-$40K+ US - and since they are high pixel, they are slow and really only good for still life - usually have to be tethered directly to a PC also).

Thanks again for your help. Later.
 
Back
Top