Ask a Question

Is there a way for TC to check if a certain registry key exists?

rachelle
Contributor

Is there a way for TC to check if a certain registry key exists?

Just wondering if TC can check if certain registry keys are present on a machine (ex. I would like to check if HKEY_LOcal machine\myapplication\parameters  exist?


1 REPLY 1


Hi,





You can accomplish your task by using the script below:





function checkKey(){

    if (Storages.Registry("myapplication", HKEY_LOCAL_MACHINE, AQRT_32_BIT).SubSectionExists("parameters"))    {

        Log.Message("The specified key exists");

    }

}







See the 'Storages Object' help topic to learn the object reference.
--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: