Why TxR (c:WindowsSystem32configtxr) is used for CBS (Windows Modules Installer)?
As we know, to apply an update it actually includes a lot of operations.
To ensure that operations are atomic, consistent, isolated, and durable (ACID), we have introduced a concept called Transaction.
Transactions are intend to group operations on resources and ensure that the operations either succeed or fail as a single unit.
TxR here stands for the Transactional Registry. It allows applications to perform registry operations in a transacted manner.
Let’s take a look at the following example:
We need to apply a KB update for a specific service:
1. The update will modify registry hive: component, which is used for Windows Modules Installer architecture.
2. The update will possibly modify registry hive: HKLM\SYSTEM\CurrentControlSet\Services, which is used for the specific service itself.
3. The update will possibly modify other registry area which is per that specific service design.
In the aforementioned example, any problem of the 3 registry modifications should trigger an update failure as well as a status roll back.
To ensure the registry modification ACID, we will group the 3 actions into a transaction and make it a single action unit.
The TxR is used for this kind of registry transactions.
If in some cases the TxR was corrupted and we need to rebuild it, we can
1. Boot into WinPE.
2. Delete all the entries from the folder <Server OS drive>:\Windows\System32\config\txr
3. Run the following commands from <Server OS drive>:\Windows\System32\config\txr :
attrib -s -h *
del *.blf
del *.regtrans-ms
4. Reboot the server to normal OS environment.
5. Run the following command as administrator.
fsutil resource setautoreset true c:\