General discussion

Locked

File locking under Windows 2000 Server

By Danielh123 ·
I am currently having an issue with one of my W2K servers running Metaframe XP 1.0. One of my users was logged into the W2K Server / Metaframe XP 1.0 sessions from a Thin Client machine. This person was scanning documents using a network scanner sharing device (scanshare). At the time the user was attempting to scan multiple invoice documents and the scanner started to "eat" one of the documents she was trying to scan. The W2K / Metaphrame XP session she was logged into gave her the message "The Scanner has stopped working" and then prompted her with a list of things to try in order to get it working again. Being the end user she is, she didn't know any better then to just "turn off" the thin client machine and restart it. Well, the next time that she tried to login to the W2K / Metaframe XP server she is getting the message that her login request could not be completed because there are files within her profile directory (w2k profile) that are still in use.

I have located the file that is currently locked and in use by whatever program she was running at the time, however I can not delete the file at this time because it is locked and still in use by that program. By process of elimination I have determined that none of the programs she was using in her Metaframe Session are still active and running on the W2K / Metaframe server. I have attempted to delete the file that the server states is still in use with no luck. It's currenly telling my there is a sharing violation when I attempt to delete the file and that it's in use by another process. I don't have the option of rebooting the server to clear the locked state of this file, hence I need to unlock the file without having to reboot the server. does anyone have any ideas? or know of a program (Task Manager doesn't work) that could possibly tell me the exact name of the process on the PC that is locking the file? Your help is greatly appreciated.

This conversation is currently closed to new comments.

10 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Danielh123 In reply to File locking under Window ...

Point value changed by question poster.

Collapse -

by timwalsh In reply to File locking under Window ...

Actually, the fix may not be difficult at all.

Your problem sounds very similar to what happens when an Office program is exited incorrectly with a file open.

Normally, a Windows program creates several temporary files during normal operations. If files and applications are exited normally, these temporary files are deleted as well.

However, of a problem cause the application to freeze, or the application is closed in other than the normal way (i.e. the system is rebooted), the temporary files are not deleted. Many times this has the effect of locking the file that was open at the time of the abnormal shut down. Usually, the fix is to empty the Temp folder of old temporary files (it won't let you delete temporary files created during the current session).

The temporary files in question SHOULD be located at C:\documents and settings\<user profile folder>\local settings\temp.

I don't have access to a Metaframe server I control to verify that the processes above actually take place. However, I did verify the locations mentioned on a Metaframe server I regularly access.

BTW, I feel your pain.

Hope this helps.

Collapse -

by Danielh123 In reply to

Poster rated this answer.

Collapse -

by jwilczyn In reply to File locking under Window ...

Try this >> Windows 2000 Resource Kit Tools >> Qslice.exe: CPU Usage by Processes
Quick Slice shows the percentage of total CPU usage for each process in the system. This tool is similar to Pstat.exe, but it presents the information in a graphical format.
Double-clicking an image name in the Quick Slice window displays details about the threads of that process. This window shows the paged pool, nonpaged pool and thread ID (TID) for the image.

Collapse -

by Danielh123 In reply to

Thanks for the information on qslice.exe, it looks like a nice addition to my tech toolbox although it didn't help resolve the issue. I decided to let the user account sit ovenight and continue working on it this morning. Well, to my amazement it fixed itself during the scheduled process maintenance overnight.

Collapse -

by Monkey_MCSE In reply to File locking under Window ...

Have you tried to delete the file through the command prompt? I have run into problems like this and i stopped sharing of the folder for a minute or so, then deleted it through command prompt. If that doesn't work, try taking ownership of the file itself and see it it will allow that, then you should be able to delete it. Also try turning off the sharing on that file if it's possible. I don't know if this will fix your problem but it has worked for me a few times. Hope it helps.
Jason

Collapse -

by Danielh123 In reply to

Poster rated this answer.

Collapse -

by cedrictrappeniers In reply to File locking under Window ...

have you tried deleting the file from the command prompt? I have had a likewise problem on a 2k client that crashed, and after rebooting, I could't delete a file because of the same reason, that it's in use
aftre trying everything and nearly losing my senses, i tried deleting the file from the command prompt, and it worked.
hope this helps...

Collapse -

by Danielh123 In reply to

Poster rated this answer.

Collapse -

by Danielh123 In reply to File locking under Window ...

This question was closed by the author

Back to Windows Forum
10 total posts (Page 1 of 1)  

Related Discussions

Related Forums