File System Locks... how to unlock?

M

Matt

Greetings,

How can I unlock a file that is locked... short of rebooting the server?
I've seen it where the file is closed, but for some reason the server
still holds onto it and the file can't be edited/renamed/deleted, etc..
and the only way so far I've been able to fix it, is to reboot the
server. Is there some way to unlock a file in W2K without rebooting?

On another note... when I upgrade an application on my Linux
workstations I can do it while people have the old version running.
When the people close the program and open it again it is now running
the new version. This allows me to upgrade programs on our Linux
Terminal Servers during working hours. Is there anyway in a W2K
terminal server / W2K workstation to upgrade a program while it is
running and have the same effect?

Is there someway to turn off this aweful file locking that W2K has? It
seems to cause more problems then it's worth. I know.. it's suppost to
keep someone from editing a file while someone else has it open, etc..
but that should be a function of the program opening the file... not the
O/S.. but that's not my question.... my question is..
A) Can I unlock a locked file
B) is there some way to do upgrades to applications while people are
using them, similar to how I can in Linux...
 
C

Chris Knapp

File locking is a function of the program/service accessing the file itself,
not Windows or its file system. When you open a Word Doc and start editing
it, Word tells the file system to place a read/write lock on the file. I
would begin by looking at what/who is locking the file.

To manually unlock your files, do the following:

Right-click on My Computer
Choose Manage
Open System Tools
Open Shared Folders
Click on Open Files (from here you can start your troubleshooting as to who
is locking the file)
Right click on the file that is open and choose Close Open File

As far as upgrading programs while they are running, its really a function
of the software writers to enable that. Not being a programmer, I can only
assume it would be very hard since almost every program is tied to the
registry.
 
M

Matt

That works if the file was shared. But what if a local program had the
file locked for some reason? For instance... IMAIL is especially bad
about this.. it will often lock files and even restarting IMAIL doesn't
cause the file to be released. What do you do for a file that gets
locked locally?

I guess this also goes back to my 'install while running' question.
Forgetting about the registry.. Windows won't let me overwrite a file
that I have open locally, until I close it. How do I go about unlocking
a local file without rebooting?
 
C

Chris Knapp

Sorry, I guess I misunderstood your question. I actually haven't found 1
utility that will close files locally. As a start, you can look at filemon
from sysinternals http://www.sysinternals.com/ntw2k/source/filemon.shtml

It monitors all file based activity on your computer so you can see is IMAIL
is really still running and using that file. It won't allow you to interact
with anything, just to watch as programs hit files.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top