Home > Windows Server Tips > > Locked files line up for changes
Windows Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 


Locked files line up for changes


Serdar Yegulalp
11.23.2004
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


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 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!


Rate this Tip
To rate tips, you must be a member of SearchWindowsServer.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

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.



Server Room Design - Planning, Cooling, Maintenance
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2004 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts