News:

No significant change

Main Menu

Hur finns vilken process som använder en dll?

Started by F16_Filur, November 15, 2007, 20:17:49

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

F16_Filur

Ok, jag har en mapp från ett gammalt avinstallerat program "Free download manager" och den går inte att ta bort för en kvarlämnad fil fumshext.dll används tydligen.

Detta händer alltså precis efter jag startat datorn.

Frågan är alltså om det finns något program som enkelt kan spåra vilken process som använder denna, med utgångspunkt från filen ifråga?

Lupson

Mvh Lupson - kortklippt.

"Kustartilleriet fördröjer fienden i kustbandet till militär hjälp kan anlända".
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Core i5 E3570K - Fractal Design Define Mini - Sapphire R290 Tri-X

F16_Filur

Tack, jag ska kolla in dom, har använt flera processprogram förut, men har alltid spårat filerna utifrån processerna, och inte tvärtom. Du menar att man kan göra sistnämnda?

Fick i alla fall bort skiten genom ett tips här:
http://xona.com/2004/08/19.html

QuoteDelete File Before Locking Process Starts Via Batch File

If you can not shut down the process that is locking the file you want to delete, here is a method of deleting the file before the process gets a chance to lock it.  As I have no idea what process and what file you are trying to delete, you may follow these directions at your own risk.

For the purpose of this tutorial, I will assume that the file you want to delete is "toolbar.dll" and it is located at "C:\Program Files\Toolbar".  In other words, I will show you how to delete "C:\Program Files\Toolbar\toolbar.dll".

Create a new text file on your "Desktop" (right-click "Desktop", "New", "Text Document")
Rename "New Text Document.txt" to "delete.bat"
The extension ".bat" determines batch files.  A batch file is a list of DOS commands that are executed when the batch file is executed.

Edit the batch file (right-click "delete.bat", "Edit")
Insert these lines (make sure to include the quotes):
REM Delete Batch File
del "C:\Program Files\Toolbar\toolbar.dll"
pause

The "del" command is the deletion command.  The "pause" command pauses so that you can see what happens before the batch file window closes.  The quotations are used as "Program Files" contains a space that will be misinterpreted as two separate words without the quotations.  You may use any DOS commands in this batch file.  You can see the commands I have chosen are to delete "C:\Program Files\Toolbar\toolbar.dll".  Pay attention to what you try to do.  "rd" cannot remove directories that are not empty, for example.

The icon of the file should change to reflect that the extension has been changed from ".txt" to ".bat".
Execute the batch file now (double click it)
Check to see if "C:\Program Files\Toolbar\toolbar.dll" is deleted.  It should still exist as the process should still be locked.  If the file is deleted, then you could have deleted it without using a batch file.  To be explicit, a batch file does not posses special powers to delete files that you do not have yourself.  A batch file can be executed at a time when the file-locking process is not running.  This is the purpose of using a batch file.

Why execute the batch file now, when it doesn't work?  Executing the batch file now lets you see what the batch file looks like when it runs, so it does not confuse you in the future.

As it says, press any key to continue. The batch file will then stop running and close down.

Now, let's run this batch file when the process is, hopefully, not running...

Explore "Startup" ("Start Menu", "Programs", Startup", right-click on Startup, Explore.)
A Windows Explorer window should open up that is exploring "C:\Documents and Settings\USERNAME\Start Menu\Programs\Startup".

Copy "delete.bat", the file itself (right-click "delete.bat", "Copy")
Paste "delete.bat", the file itself, into "Startup" (right-click in the "Startup" directory where the files go, "Paste".)
You should see "delete.bat" existing in your "Startup" directory.  Now your batch file will run "on startup", when your computer 'starts up' from being shut off or rebooted.  Hopefully it will run before the process that locks the file runs.

Reboot your computer and go see if the file gets deleted.
This is when you can tell if it worked or not.

"C:\Program Files\Toolbar\toolbar.dll", or whatever file you choose to delete, should be deleted.

griffin

Enkel lösning! Snyggt.
Kan tänka mig att det dock finns situationer där processen hinner start och låsa innan autostartfunktionen har kickat in. Det lär man ju märka.

snappahead