dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
133246
share rss forum feed


jdong
Eat A Beaver, Save A Tree.
Premium
join:2002-07-09
Rochester, MI
kudos:1


4 recommendations

[Windows] Dr. Delete: Remove in-use files!

Having trouble deleting:


    •In-use files?
    •Spyware Components
    Index.dat


and other annoying files that are 'In use'?

So was I! I sat down to work, researching the Win32 API and scheduling files to be deleted... and so Dr. Delete was born! Dr. Delete can delete in-use files by scheduling them to be deleted at the next startup. It calls upon the Win32 API, so it's using safe and tested code. Written with Visual C++ / MFC. Native executable, MFC compiled into program (since most people don't have MFC 7.1 )

Works on NT/2k/XP/2003 by calling the MoveFileEx() API function.

Works on 9x/ME by appending/creating the WinInit.ini file.

Instructions:

You may use Dr. Delete in 3 ways to delete files:

(1) Launch it with a command-line argument, like DrDelete myfile. Dr Delete will start up and place myfile in its textbox.

(2) Drag a file into Dr. Delete's icon / or Open With dr. delete. Does the same as #1.

(3) Open up Dr. Delete, Type in a filename (or use Browse ), then click Delete.

Note: Dr. Delete will first attempt to delete the file without rebooting. Just to be safe . If it figures out it couldn't, it schedules the file to be deleted on reboot, but it does _NOT_ (that's NOT) reboot for you!

Hope you find Dr. Delete useful...

Edit: Added ScreenShots. Resolved an issue with XP/2003 that caused the platform to be reported as 'unknown'.
--
Word of advice: Never trust a doctor whose office plants have died...
P.S.: Thank you, Optimized, for making me premium!

[text was edited by author 2003-07-11 15:59:53]


jaykaykay
4 Ever Young
Premium,MVM
join:2000-04-13
USA
kudos:24
Reviews:
·Cox HSI
·Speakeasy

1 recommendation

I think that this might be a very useful tool and might have been really handy for many posters in the past having problems deleting a file. I would love to hear/read some other's thoughts on what looks to me to be a good thing before even d/l this to keep in case of need.
--
JKKAge is a very high price to pay for my maturity. If I can't stay young, I can at least stay immature!



Ghost of Jdong

@wideopenwest.com
reply to jdong

I suspect some people might be afraid of downloading this... common security practice. Well, I have had (what I think) a very good record on this forum, IMO. Never uploaded anything harmful, never will.

As soon as I get above this stupid posting limit, I'll attach the source so you paranoid security guys can build it yourselves...

P.S. Yes, it's really me, jdong



jaykaykay
4 Ever Young
Premium,MVM
join:2000-04-13
USA
kudos:24
Reviews:
·Cox HSI
·Speakeasy

1 recommendation

I believe you and I believe that it is probably a very good program. I know you have a good rep and wasn't trying to diminish that. I just don't know enough about computers and programs to feel comfortable without knowing that others, preferably many, have d/l the same thing. I don't know enough to know how to clean up a mess I might make so am just slightly paranoid. It's not you. It's me, Jdong.
--
JKKAge is a very high price to pay for my maturity. If I can't stay young, I can at least stay immature!



norris

@mesanetworks.net
reply to jdong

I tested it out. Works as advertised.
Only thing I might suggest is a 'Close' button next to the 'Delete' button.
Well, maybe two things. Is it possible to provide the name of the process that has a lock on the file? May be handy for people trying to get rid of malware (or not, I've not had much experience doing that).
Looks good, though.


RdKryton
Premium
join:2002-03-17
Downingtown, PA
reply to jdong

Index.dat? Why would I want to get rid of this file? Looks like I'm about to learn something here. Good thing too. It's been a bad day...
--
Raising teenagers is like nailing Jello to a tree....



jdong
Eat A Beaver, Save A Tree.
Premium
join:2002-07-09
Rochester, MI
kudos:1
reply to jdong

Got back on...

First of all, I'd like to certify the post by my ghost. I did say what my ghost said (and I use Wideopenwest, too ).

Second, I'd like to say that it's OK if you don't trust my programs, I won't be offended...

And thanks, Norris, for testing out my program. About process lock, I'll have to research what API that uses. Currently, the MoveFileEx API doesn't provide me with much info... And I'll add the close button and the source as soon as I get over my post limit... my current method of access doesn't allow me to attach... and I don't want people to have to scroll over 2 pages of C++ just to be able to view others' comments.


TDS3_User
Premium
join:2002-11-23
Australia
reply to RdKryton

Hi RdKryton

index.dat file in your temporary internet files is another way of tracking where you have visited....

for eg: go to your TIFS [Temporary Internet Files] look for the index.dat file in there, right click and choose Open with... Notepad.. you will see a lot of gobblygook BUT you will also see the URLs of sites you have visited....

I have mine set up to delete each time I reboot...

Now, you can't delete it by simply clicking delete, you need some sort of program to do it for you as it's a system file...

Once deleted, Windows WILL RE-CREATE it for you back to the default 32Kb size... I have seen some index.dat files up to 1Mb and higher, so you can imagine how much info was stored in there... Mine was originally up to 1.8Mb until I discovered a tool to remove it upon reboot.

HTH..

tds
--
TDS3: RATS are like mice once TDS gets thru with them!


TDS3_User
Premium
join:2002-11-23
Australia

1 recommendation

reply to jdong

Jdong.... THUMBS UP MATE...

Verry quick... very simple... works perfect..

Tested on some files via, drag and drop straight onto the desktop executable Icon, it opened and asked me if I wanted to delete, yep, worked.

Opened it, browsed to a test file, selected it, Delete, asked me if I wanted to delete, yep, worked.

Opened it, browsed to index.dat file, Delte, asked me, yep, it said it's been marked for deletion upon next reboot...

@JKK.. no probs mate. try it I simply downloaded, unzipped, dragged the .exe onto desktop and left it there for easy access.

tds.
--
TDS3: RATS are like mice once TDS gets thru with them!



jaykaykay
4 Ever Young
Premium,MVM
join:2000-04-13
USA
kudos:24
Reviews:
·Cox HSI
·Speakeasy

1 recommendation

Thanks for being a guinea pig along with Norris. I don't trust myself, but I do trust many of you guys...including you Jdong. I have only one box and must be very careful not to screw something up on it.
--
JKKAge is a very high price to pay for my maturity. If I can't stay young, I can at least stay immature!



Wildwusel
Premium
join:2001-12-04
Richardson, TX
reply to jdong

I just tried it. Works great. I deleted a file, which I have not been able to get rid of for some time, not even in save mode. It did not require a reboot.
This is just fantastic…. Thanks a lot!



Rxdoxx
Premium,Ex-Mod 2002-13
join:2000-11-03
Middle River, MD
kudos:11
reply to jdong

From Marcus Jansson's web site »www.markusjansson.net/eienbid.html about 3/4 of the way down

"Index.dat files contain information about websites you have visited, things you have done, cookies you have received, etc. The main purpose, according to Microsoft, is that they speedup browsing by keeping this information nearby. The problem is, that they don’t delete when you clear your temporary internet files! This is because Windows locks those files. They need to be cleared BEFORE it has a chance of doing that."

I'm running a modification of it since I want to leave a few cookies (like DSLR for one), so I don't want cookies deleted that way. But I sure get the index and history with a batch file.

jdong, interesting....I did a search for index.dat and came up with 78!!!!!!!!!! hits.
Looks like 2 are live, one is a link to Marcus' site and the other 75 appear to be from jv16powertools (with a period before it .index.dat). I'll probe there some more, just found it interesting.

Looks like Dr.Delete is going to be fun to play with Thank You!
--
A word aptly spoken is like apples of gold


Sandman
Premium
join:2002-07-10
Strafford, MO
reply to jdong

I haven't downloaded your program yet, and so far have not had any use for it. I'll keep it in mind should the need arise though; sounds like a great program.
--
"Senores y senoras, nosotros tenemos mas influencia con sus hijos que tu tiene. Pero los queremo. Creado y regalo de Los Angeles, Jana's Adiccion."


Martin34

join:2003-07-12
netherlands

reply to jdong

Hi all, just gave the prog a spin, used index.dat to try it out, it said it would delete the file on next reboot, nothing happened, index.dat is still there in its original size 944Kb.

Did i do something wrong???

Running WinME

rgds,
Martin
[text was edited by author 2003-07-12 05:12:55]



jdong
Eat A Beaver, Save A Tree.
Premium
join:2002-07-09
Rochester, MI
kudos:1

said by Martin34:

Did i do something wrong???

Running WinME

rgds,
Martin

That could be it... My Windows Version checking algorithm is still flawed... I guess I'll just do both 9x/ME and NT methods blindly (doesn't do any harm. MoveFileEx will just return an error on 9x, and in NT you'll just have an extra 1KB text file in your Windows folder...)
--
Word of advice: Never trust a doctor whose office plants have died...
P.S.: Thank you, Optimized, for making me premium!


telo
Premium
join:2002-04-15
Hooterville

1 recommendation

reply to Rxdoxx

If using Windows XP, don't delete the index.dat in C:\WINDOWS\PCHEALTH\HELPCTR\OfflineCache as System Information (msinfo32.exe) doesn't run without it and Windows doesn't seem to replace it.


mfmruizv

join:2001-09-01
USA
reply to jdong

this is only good for deleting files right ? i tried usin it to delete the folders that came preinstalled with xp xerox, Windows Media Player,microsoft frontpage and msn gaming zone/windows and it couldnt delete them.
(i scheduled to delete on reboot and tried deleting from within the prog). i have no idea why they say theyre are u in use by another app theres no files at all in them , but i think this is a issue with xp and everyone has ?



Bach
Premium
join:2002-02-16
Flint, MI

1 recommendation

reply to jdong

said by jdong:
That could be it... My Windows Version checking algorithm is still flawed... I guess I'll just do both 9x/ME and NT methods blindly (doesn't do any harm. MoveFileEx will just return an error on 9x, and in NT you'll just have an extra 1KB text file in your Windows folder...)
Does your checking routine call GetVersionEx to determine if it's an NT technology (NT/2K/XP) platform? That function should cleanly tell you whether to use WININIT.INI or use MoveFileEx with MOVEFILE_DELAY_UNTIL_REBOOT. I use this function to branch within code needing to determine the platform:
code:

BOOL IsWinNT()
{
OSVERSIONINFO osvi;
memset(&osvi, 0, sizeof(osvi));
osvi.dwOSVersionInfoSize = sizeof(osvi);
if (GetVersionEx(&osvi))
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
return TRUE;
return FALSE;
}



Beaver Eater

@wideopenwest.com
reply to jdong

Thanks, Romcat, for that code snippet. Just what I needed. As soon as (1) justin See Profile gives me mercy or (2) I get below my posting limit , I'll upload the new one...

P.S.: Romcat, I guess my version was too simple...

OSVERSIONINFO osvi;
GetVersionEx(&osvi);
switch(osvi.dwPlatformId)
{
...
}

--Signed, a very embarrassed Beaver Eater (jdong)



Bach
Premium
join:2002-02-16
Flint, MI

Add one line to your original code it would have probably been OK:

OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(osvi); // add this line
GetVersionEx(&osvi);
switch(osvi.dwPlatformId)

The dwOSVersionInfoSize needs to be stuffed before the call so that the OS knows what structure you're using (OSVERSIONINFO vs. OSVERSIONINFOEX). The memset to zero I had in my code is probably overkill.



jdong
Eat A Beaver, Save A Tree.
Premium
join:2002-07-09
Rochester, MI
kudos:1

1 recommendation

said by Bach:
Add one line to your original code it would have probably been OK.
Silly me, found that info in the MSDN writeup . I'm sorry about that. Usually, I fully read the MSDN writeup before using a program, but oh, what the heck, decided that I should just go for it.... sorry.

Anyway, here's the new/updated version of Dr. Delete. New features since last one:


    •Actual OS detection, NT vs 9x.
    •Added additional messages indicating OS detected.
    •Added 'trap' for unknown OS'es; in which case you may pick the method of deletion.
    •Close button next to delete button.
    •When dragging a file or opening with Dr. Delete, the 'Delete' button is automatically invoked (so you get the 'are you sure' message.


The attached file is RAR Self-Extracting (if you have WinRAR, you may open it with WinRAR, or even if you don't just run the EXE to extract). This contains the EXE plus the source code. This was written in Visual C++ .NET 2003 (ooh, fancy ), and probably will only compile with Visual C++ .NET or .NET 2003...

If you really want to compile it for free, let me know, and I'll write a C# version that can be compiled with free tools.
--
Word of advice: Never trust a doctor whose office plants have died...
P.S.: Thank you, Optimized, for making me premium!


richardfrey11001

join:2000-11-15
Floral Park, NY
reply to jdong

So where do I find these Index.dat files? When I go to "C:\WINNT\Temp\Temporary Internet Files\Content.IE5" I find a file that won't open so I cant tell what is inside,and Dr.Delete just wants to delete the whole file.


B
Premium,MVM
join:2000-10-28
reply to jdong

Thanks, jdong. It looks good, although I haven't tried it.

Three thoughts (enhancements?):

1. I always prefer renaming a suspect file, if only in order to keep a record of the date of a suspected infiltration. You might add a "rename" or "move" feature, instead of deleting it.

2. Perhaps you could have it open up an interactive shell session, letting the user do what he or she wants? In other words, a working command-line safe mode?

3. Does the old "winstart.bat" trick for this sort of thing still work in NT-based OS's?

Thanks again for your good work.

-- B



jdong
Eat A Beaver, Save A Tree.
Premium
join:2002-07-09
Rochester, MI
kudos:1

said by B:

Three thoughts (enhancements?):

1. I always prefer renaming a suspect file, if only in order to keep a record of the date of a suspected infiltration. You might add a "rename" or "move" feature, instead of deleting it.

2. Perhaps you could have it open up an interactive shell session, letting the user do what he or she wants? In other words, a working command-line safe mode?

3. Does the old "winstart.bat" trick for this sort of thing still work in NT-based OS's?

Thanks again for your good work.

-- B
    •Interesting idea... It should be very simple to implement, maybe I will...•Hmm, that might be a good idea... I'll think about it.•No.:)

--
Word of advice: Never trust a doctor whose office plants have died...
P.S.: Thank you, Optimized, for making me premium!


_olly_

@gotadsl.co.uk
reply to jdong

Hi - this is indeed a great piece of software - I encoded some mp3's from a CD that ended up having a file name that was too long so Windows had real problems with them and I couldn't delete or rename them. I tried everything I could think of before looking at special software. Yours was the first I saw that looked like it might work and... it did perfectly with no reboot required. Thanks a lot for putting this out - I'm going to keep it in my folder for useful software (which is kind of a privilege - ok well not really but you know what I mean!). Thanks again - did exactly what it said and looks kind of neat too.

_Olly_



David
I start new work on
Premium,VIP
join:2002-05-30
Granite City, IL
kudos:101
Reviews:
·DIRECTV
·AT&T Midwest
·magicjack.com
·Google Voice

Nice, Very nice. worthy of front page material!! you have my vote!!

Another question?? care if I give this to a few tech buddies?? Just curious... and let me know..

Considering some of the complications I have in getting rid of some files some of us will probably donate to the cause

[text was edited by author 2003-09-22 06:47:18]