BrainDump
  Home arrow BrainDump arrow Page 4 - How to Hack Protected Windows XP Files
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
BRAINDUMP

How to Hack Protected Windows XP Files
By: Nilpo/Developer Shed Staff Writer
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 10
    2007-04-16

    Table of Contents:
  • How to Hack Protected Windows XP Files
  • How Windows protects files
  • Replacing file that are in use
  • PendingFile RenameOperations
  • Using Wininit.ini on legacy systems.

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    How to Hack Protected Windows XP Files - PendingFile RenameOperations


    (Page 4 of 5 )

    If you come to the conclusion that you’re stuck resorting to the reboot method—or just plain don’t feel like figuring out any alternative—then you’re going to need to use the Windows registry.

    Windows understands that some program installations will be required to alter files that may be in use so it provides a method of doing just that.  It’s known as the PendingFileRenameOperations method.  It takes its name from the registry it uses to manage these pending changes.

    Application developers should make use of the MoveFileEx() function in the Win32 API rather than editing the PendingFileRenameOperations key directly.

    PendingFileRenameOperations is made available by the Windows Session Manager.  It is a multi-string (REG_MULTI_SZ) key that contains file name pairs for all files to be renamed (including move or deleted) upon the next reboot.

    If this key does not exist, you can create it.  Enter regedit in the Run… dialog box to launch Registry Editor.  On the HKEY_LOCAL_MACHINE hive, navigate to CurrentControlSet, Control, Session Manager.

    In the right pane, open the PendingFileRenameOperations key or create it by right-clicking and choosing New > Multi-String value.  Be sure that the key name does not contain any spaces.

    Once you have the key open for editing, you can begin adding the changes that need to be made.  Each entry needs to be a two-line pair.  The first line should be the full path to the original file and the second should be the replacement, or what the file should be after the rename procedure.

    To rename a file, simply enter the same full path with the new file name as the second entry.  Altering the path in the second entry will result in a move operation.  A new path AND file name would result in both a move AND a simultaneous rename.  Finally, to delete a file, simply use a blank line.

    So an entry in this registry key might look something like the following:

    C:\Windows\original.txt

    C:\Windows\renamed.txt

    C:\deleteme.txt

     

    C:\original.file

    C:\new directory\original.file

    In the above example, I have the PendingFileRenameOperations key set to perform three actions.  The first two lines perform a simple file rename.  The second two—notice the blank line—perform a file delete.  And the last two lines perform a move operation.

    Because each line is expected to contain only a single path, you may enter paths that contain spaces without having to enclose them in quotation marks.  Long file names are also supported.

    If you are uncomfortable editing the registry, there are a couple of really nice command-line tools available that will create or edit the key for you.  You can get download details for PendMoves and MoveFile by visiting Microsoft’s TechNet site.

    The operations in the PendingFileRenameOperations key will be performed at the next system startup, at which time they will be removed upon successful completion.  Note that this registry key is only supported on NT versions of Windows.  For older systems, you should use the Wininit.ini method.

    More BrainDump Articles
    More By Nilpo/Developer Shed Staff Writer


       · There seems to be quite a bit of bad advice going around about how to hack protected...
     

    BRAINDUMP ARTICLES

    - XAML Brushes and Silverlight
    - Silverlight and XAML Basics
    - Immortal XP
    - XAML Basics
    - Microsoft Surface
    - Making Your First Active X Control in Visual...
    - Codes and Packages in Microsoft Project 2007
    - Windows 7: Rumors and Demos
    - XP SP3 Why Me?
    - Breaking Up Your Work in Microsoft Project
    - Breaking Work into Task-Sized Chunks
    - Putting Microsoft`s Worldwide Telescope Unde...
    - Handling Multiple Contracts with Indigo
    - Cleaning Out Your Data in XP
    - Multiple Service Contracts and Indigo





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway