4

In short, I need to do what was asked here:

One hardlink is locked. How do I remove the other?

The given solution doesn't work for me as I'm trying to create/delete a hardlink to a file that is in use by an application I can't stop and I expect to essentially run forever.

Is there truly no way to remove the link to a locked file? It seems odd to me that I can create the link but not remove it...

3
  • I don't know if hard links are affected by locks like that. They might be. You could try manually freeing the lock with something like Process Explorer, but that may make the application unstable. Feb 7, 2012 at 18:07
  • They definitely are. I have a file that is in use by an application and I can successfully create a hardlink to that file, however, I cannot delete the hardlink as the file is in use.
    – Morinar
    Feb 7, 2012 at 18:08
  • possible duplicate of One hardlink is locked. How do I remove the other? Feb 28, 2012 at 21:11

1 Answer 1

-1

Through combinations of "link shell extention" which messes with links. "take ownership" which messes with protections, and "unlocker" which can do deletes of locked file, and deletes at boot, You can do anything.

Disclaimer: Including destroying the whole system :-) So a full image backup (that works outside of the system, does not rely on the system, and works when the system is ruined) would be the first requirement.

Add in programs like "autoruns" , using "process explorer" and "resource monitor" , understanding cmd items "fsutil" , "net", "devcon" , and working elevated, or under the real admin, are handy things also. All usefull in further getting myself into more trouble , going to war with the new system.

No links are provided, because getting them is the easy part, just make sure you get them from source locations.

12
  • The question states that the locking application can't be stopped. So a method using Unlocker will not succeed since the lock will exist before Unlocker's driver is loaded. I don't know what you're suggesting be done with the Link Shell Extension, Autoruns, net, or fsutil; none of those can unlock a locked file. Feb 7, 2012 at 23:58
  • @Amazed There is no item that cannot be stopped, although some of them might stop the operation of the system. Then (right or wrong?) The last link cannot be removed without removing the last pointer to the data on the disk, effectivly deleting the item? So if a person is trying to remove the last link, wouldnt it be assumed they are trying to remove the file itself? I think you can come up with a better answer , I barely have my own machine under control. The reason for the other items is clear, they stop things, and can delete things that are not even visable.
    – Psycogeek
    Feb 8, 2012 at 0:15
  • "In short" it was stated that morinar wanted to do what was on the link shown. The link is about breaking the link, and getting rid of the file. So if the intent is different, that is not very clear in the question.
    – Psycogeek
    Feb 8, 2012 at 0:25
  • The question states that it can't be stopped. I take this to mean that the application is critical and therefore cannot be stopped because doing so would damage something, either physically or financially. Any solution which requires that the application be stopped removes the need to unlock the file in the first place. Feb 8, 2012 at 1:15
  • @Amazed if you know what the file item is or the service or driver or program that has it locked, please tell. Then i can attempt to write a step by step , by actually performing it here. (or trying to)
    – Psycogeek
    Feb 8, 2012 at 1:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .