Checking for reg keys?

Discussion in 'AutoCAD' started by Timothy Spangler, Jul 18, 2003.

  1. I have created this sub-routine for checking the existence of reg keys. Can
    a few people try it and see if it works? It works for me and all of the
    testing that I have done with it. Maybe someone can get it to fail.

    Thanks

    --
    _________________________________
    Timothy Spangler

    "You cannot escape the responsibility of tomorrow by evading it today"
    Abraham Lincoln
    _________________________________

    AutoCAD 2002
    WinXP Pro
    Compaq Evo W6000
    Intel Xeon / 1G RAM
     
    Timothy Spangler, Jul 18, 2003
    #1
  2. Because (vl-registry-read) returns nil for an empty key.

    (setq a "HKEY_CURRENT_USER\\SOFTWARE\\Test")
    "HKEY_CURRENT_USER\\SOFTWARE\\Test"

    (vl-registry-write a)
    T

    (vl-registry-read a)
    nil
     
    Jason Piercey, Jul 18, 2003
    #2
  3. ahhh, grasshoppuuuhhh.
    got it...thanks


    "Jason Piercey" <Jason@AtrEngDotCom>
    |>Because (vl-registry-read) returns nil for an empty key.
    |>
    |>(setq a "HKEY_CURRENT_USER\\SOFTWARE\\Test")
    |>"HKEY_CURRENT_USER\\SOFTWARE\\Test"
    |>
    |>(vl-registry-write a)
    |>T
    |>
    |>(vl-registry-read a)
    |>nil

    James Maeding
    Civil Engineer/Programmer
     
    James Maeding, Jul 18, 2003
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.