25
Jun 14

Set DCOM transaction timeout programmatically

The DCOM transaction timeout setting is one of several Windows settings that I commonly have to tweak for the applications that I work with. The following is a VBScript for setting the transaction timeout value programmatically. To use, simply save the code snippet in a .vbs file.

Set oCatalog = CreateObject("COMAdmin.COMAdminCatalog")
Set oRootColl = oCatalog.Connect("localhost")
 
Set oLocalComputerColl = oRootColl.GetCollection("LocalComputer", oRootColl.Name)
oLocalComputerColl.Populate
 
Set oLocalComputer = oLocalComputerColl.Item(0)
oLocalComputer.Value("TransactionTimeout") = 120
 
oLocalComputerColl.SaveChanges

For other COM settings that can be set programmatically, please try the vApps COM+ Explorer utility.