General discussion

Locked

How to replace file currently in use?

By Bob Smithers ·
I am referencing a central network screensaver on my workstations. I'm doing this on NT machines with a policy. On the 95 machines, I am referencing the screensaver through the system.ini. This .scr file needs to be updated frequently, but everytime you try to replace the file with the current revision, you get a "file in use error." Anyone know a way around this? I can go in through server manager and manually close the resource, but I need a regular user (not admin) to be able to replacethis file. Thanks for any help!

This conversation is currently closed to new comments.

15 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

How to replace file currently in use?

by maxwell edison In reply to How to replace file curre ...

The file-In-Use Replace Utility is a command-line tool that performs on-the-fly replacement of files currently in use by the operating system. You must be a member of the Administrators group to use this tool. InUse is primarily used to replace locked operating system files. After running the tool, the file specified is not replaced until the system is restarted. During restart, the system moves the file immediately after AUTOCHK is run, but before creating any paging files. This tool is usefulfor troubleshooting purposes, where you might need to replace an individual file on your computer instead of an entire set of files.

It is one of the Windows 2000/NT Server Resource Kit Support Tools, but Microsoft has made it available for freedownload.

The source for this answer and the free file download link may be found at:

http://windows.about.com/library/tips/bltip391.htm

(REMOVE SPACES from the pasted URL.)

Maxwell

Collapse -

How to replace file currently in use?

by Bob Smithers In reply to How to replace file curre ...

Poster rated this answer

Collapse -

How to replace file currently in use?

by maxwell edison In reply to How to replace file curre ...

Or

How to Replace In-Use Windows NT System Files:

Microsoft article Q184408:

SUMMARY:
This article describes how to replace system files that are in use by using the Mv.exe tool included with the Windows NT 4.0 Resource Kit.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q184408

(REMOVE SPACES from the pasted URL.)

Maxwell

Collapse -

How to replace file currently in use?

by maxwell edison In reply to How to replace file curre ...

Another possible:

How to Replace Currently Locked Files with Inuse.exe

Microsoft article Q228930.

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q228930

(REMOVE SPACES from the pasted URL.)

Maxwell

Collapse -

How to replace file currently in use?

by Bob Smithers In reply to How to replace file curre ...

Poster rated this answer

Collapse -

How to replace file currently in use?

by Bob Smithers In reply to How to replace file curre ...

The trick is, I need to replace the file right then. I can't wait for a reboot for a utility to replace the file. The file resides on our file server.

Collapse -

How to replace file currently in use?

by Lez In reply to How to replace file curre ...

From what you are saying, you may have a catch 22 situation.
All your users are accessing this file once they start up their system right? So even if one user close his/her file handle, all the other users are still locking it.

Now, only an admin ID can force everyone to close the file from the server end. And you are correct in not letting users have admin rights.

Hence the vicious loop. Theer are 2 workarounds that I can think of, use the net file command to list out the file IDs into a text file and write a batch to close all the files. An earlier thread on the net command can be found here

http://www.techrepublic.com/forumqa/thread_detail.jhtml?thread_id=94803

The other simplest solution will be to copy the scr from using autoexec, that way the file on the server won't be locked and you can update it as needed. The problem is, some people don't logout/reboot their PCs as often as administrators want them to ;p and it won't take effect until they reboot. So you'll haveto email them and tell them to reboot their PCs.

Collapse -

How to replace file currently in use?

by Bob Smithers In reply to How to replace file curre ...

Thanks for the advice, but the link above would not work for me. The other solution unfortunately probably is not the option. I think that I'll just have to close any links to that file manually. Thanks for the help though.

Collapse -

How to replace file currently in use?

by Lez In reply to How to replace file curre ...

From what you are saying, you may have a catch 22 situation.
All your users are accessing this file once they start up their system right? So even if one user close his/her file handle, all the other users are still locking it.

Now, only an admin ID can force everyone to close the file from the server end. And you are correct in not letting users have admin rights.

Hence the vicious loop. Theer are 2 workarounds that I can think of, use the net file command to list out the file IDs into a text file and write a batch to close all the files. An earlier thread on the net command can be found here

http://www.techrepublic.com/forumqa/thread_detail.jhtml?thread_id=94803

The other simplest solution will be to copy the scr from using autoexec, that way the file on the server won't be locked and you can update it as needed. The problem is, some people don't logout/reboot their PCs as often as administrators want them to ;p and it won't take effect until they reboot. So you'll haveto email them and tell them to reboot their PCs.

Collapse -

How to replace file currently in use?

by Bob Smithers In reply to How to replace file curre ...

Poster rated this answer

Back to Windows Forum
15 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums