Forum Discussion

Morgan's avatar
Morgan
Frequent Contributor
14 years ago

Delete registry key and all subkeys via script

Hello,



I need to delete a registry key and all of it's subkeys in the beginning of my script but am a little confused about which method to use.  Obviously it's a little nerve-wracking....



In VBScript, can you please direct me as to which is the best way to accomplish this?



Thanks,

Morgan

3 Replies

  • Morgan's avatar
    Morgan
    Frequent Contributor
    I took a chance and think I managed to get it working with the .clear method.  Is there any way to get rid of the key folder entirely or just clear its contents?



    Thanks,

    M
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Have you looked at the sample projects that get installed with TestComplete?



    There's a section of code in there for VBScript.  Essentially, you should look at the "Clear" method off of a Storages.Registry object.
  • yesterday i was able to connect suddenly this happened today.. all my credentials are fine

    i changed my hard disk also..same error



    now i have changed the cpu and harddisk , then it worked fine

    i submitted code in smart bear from perforce

    again after restarting same error.