Contributions
- 1.2KViews0likes0Comments
Storages.Registry() fails in Non-English Windows OS
Function below runs successfully on English Windows OS, but fails on line objSectionKey = Storages.Registry(strKey, longRootKey, intRegistryType, blnReadOnly); on Non-English Windows OS (I am using Windows 7 Russian, and TestComplete v11) with following error... Unable to open the registry key HKEY_CLASSES_ROOT\Excel.Application\CLSID . Try to open it in read-only mode. Any help will be appreciated. function DisableExcelApp() { var longRootKey = HKEY_CLASSES_ROOT; var strKey = "Excel.Application\\CLSID"; var strRegName = "(Default)"; var strRegVal; var intRegistryType; var blnReadOnly = false; var objSectionKey; (Sys.OSInfo.Windows64bit) ? (intRegistryType = AQRT_64_BIT) : (intRegistryType = AQRT_32_BIT); objSectionKey = Storages.Registry(strKey, longRootKey, intRegistryType, blnReadOnly); strRegVal = objSectionKey.GetOptionByIndex(0, ""); strRegVal = strRegVal + ".Disabled"; objSectionKey.SetOptionByIndex(0, strRegVal); Log.Message("Disabled Excel application."); } // End DisableExcelApp()Solved1.2KViews0likes2Comments- 1.1KViews0likes0Comments
How to rename Registry (Subsection)?
A Section object is returned by the Registry method of the Storages object. https://support.smartbear.com/viewarticle/85046/ I understand how I can create/modify an 'Option' (using SetOption Method). But how can I rename existing 'Subsection'? I am trying to temporarily modify a RegistrySubSection (by appending '_old') to setup condition for particular test. Any help will be appreciated.Solved1.1KViews0likes2Comments