Build Registry Path

Author Message
toad38

  • Total Posts : 41
  • Scores: 0
  • Reward points : 0
  • Joined: 9/4/2008
  • Status: offline
Build Registry Path Friday, November 18, 2011 2:51 AM (permalink)
0
Does anyone have an example how to build a regitry path. For example, assuming part or all of the following path does not exist, I would want a function that is smart enough to build the missing keys and create a new value and set the value data.
 
fnCreateRegPath "HKLM\SOFTWARE\NewKey\NewSubKey\NewSubKey\NewSubKey\NewSubKey" "New Value", "NewValueData" "NewValueDataType"
 
I'm also thinking it would delete the value and re-create the value each time (reason being: the value data type (string, DWORD, etc.) could be incorrect and recreating the value would resolve this)
 
#1
    ebgreen

    • Total Posts : 8219
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: offline
    Re:Build Registry Path Friday, November 18, 2011 3:22 AM (permalink)
    0
    Search the forum for SmartRegWrite
    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
    http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2
      toad38

      • Total Posts : 41
      • Scores: 0
      • Reward points : 0
      • Joined: 9/4/2008
      • Status: offline
      Re:Build Registry Path Monday, November 21, 2011 4:44 AM (permalink)
      0
      That is good information ebgreen! Thank you. Here is the link for others: http://www.visualbasicscript.com/tm.aspx?m=61419
       
      I'm curious though. This function only writes STRING values to the registry. How difficult would it be to expand this to optionally write DWORD and BINARY values? I like to think I'm pretty good at vbscript, but I suppose I'm not following this particular function well enough to feel comfortable updating it.
       
      #3
        ebgreen

        • Total Posts : 8219
        • Scores: 98
        • Reward points : 0
        • Joined: 7/12/2005
        • Status: offline
        Re:Build Registry Path Monday, November 21, 2011 6:14 AM (permalink)
        0
        I don't imagine it would be particularly difficult. Just pass in another parameter that would control the type.
        "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
        Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
        http://www.visualbasicscript.com/m_47117/tm.htm
         
        #4

          Online Bookmarks Sharing: Share/Bookmark

          Jump to:

          Current active users

          There are 0 members and 1 guests.

          Icon Legend and Permission

          • New Messages
          • No New Messages
          • Hot Topic w/ New Messages
          • Hot Topic w/o New Messages
          • Locked w/ New Messages
          • Locked w/o New Messages
          • Read Message
          • Post New Thread
          • Reply to message
          • Post New Poll
          • Submit Vote
          • Post reward post
          • Delete my own posts
          • Delete my own threads
          • Rate post

          2000-2012 ASPPlayground.NET Forum Version 3.9