This tip was submitted to SearchWinSystems.com by expert Serdar Yegulalp. Please let other users know how useful it is by rating it below.


When a program installer, a hotfix or a service pack wants to make changes to a system, the changes usually involve files that the system has locked and can't be changed automatically.

Windows has an API called MoveFileEx that lets a program queue up changes to be made to locked files the next time the system reboots. This is why many installers require that you reboot the computer to make the program functional: some of the files that the program needs may not yet actually be installed until the next reboot.

It's not always easy to tell offhand what files have been added or replaced; the timestamps on files can be misleading, and tracking down the changed files after the fact is tedious and time-consuming. A list of the files you need to add, change or delete are added to the Registry under the key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations.. The Session Manager iterates through this list at startup and makes the changes listed.

If you don't feel like digging through the Registry, the ever-prolific Mark Russinovich of the Sysinternals site has also developed a freeware command-line tool called PendMoves.

PendMoves dumps out the contents of the pending rename/delete values in the key, and also iterates through

    Requires Free Membership to View

the files to be changed and reports an error if one of them isn't available. This can be handy as a way to automatically report out changes to be made to files as part of an installation control script, or for simple system auditing (such as if you want to see if a particular program does in fact make certain changes).

PendMoves can be downloaded at http://www.sysinternals.com/files/pendmoves.zip and also includes a utility called Movefile, which lets you specify your own files to be replaced at the next boot.


Serdar Yegulalp is editor of the Windows Power Users Newsletter. Check it out for the latest advice and musings on the world of Windows network administrators -- and please share your thoughts as well!


This was first published in November 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.