Introducing the Windows Kernel Transaction Manager, Transactional NTFS and Transactional Registry
Windows Vista and later versions of Windows have a so called Kernel Transaction Manager (KTM). This makes it easy for application to use transactions. There are two big components built on top of the KTM: Transactional NTFS (TxF) and Transactional Registry (TxR). With TxF you can combine several file system operations into a transaction and either commit or rollback the transaction as a whole. TxR allows you to do the same thing with registry manipulations. File system transactions and registry transactions can be grouped into a single transaction. That way we can ensure that all file system modifications and all registry modifications are fully executed or none at all.
I wrote an article that gives a very brief overview of TxF and TxR to give you an idea of what you can accomplish with it. Creating your own transaction manager other than TxF or TxR is also possible but requires you to create a Win32 transaction aware service (= resource manager) which is outside the scope of this introductory article. You can read the full article on codeguru.com.