Forum Discussion

mohanakshi's avatar
mohanakshi
Contributor
14 years ago

Storages.Registry- Please help me

Hi,

       I am working on reading registry content using Storages.Registry object......

Here i wanted to check the folder PATH in the given KEY, whether folder  exists or not....

But Storages.Registry is creating the new folder in the path where it does not exists...

Please help me to take a status of existence of the folder in the given path.. and even i want to know more information on this.....



"Its Urgent!!"

Thanking You,



Regards,

Mohanakshi

  • Hi Mohanakshi,





    You need to obtain the Section object corresponding to the parent folder and then call the Section.SubSectionExists method to verify whether it contains a subfolder with the given name.





    Suppose that you need to verify the HKEY_CURRENT_USER\ParentSectionPath\NeededSubSection key, then the script would be:



    function TestSubSection()



      if (Storages.Registry("ParentSectionPath", HKEY_CURRENT_USER).SubSectionExists("NeededSubSection"))

        Log.Message("The registry folder exists");

      else

        Log.Warning("The specified registry folder does not exist."); 

    }