Forcing Update to Registry

Discussion in 'AutoCAD' started by Jeffery_P_Sanders, Apr 2, 2004.

  1. I am attempting to modify the registry with vl-registry-write. I am adding a program to the startup suite. This works sometimes after restarting windows, restarting autocad, and starting a new drawing. Half of the time it is ignored. I have tried this with AutoCAD 2000 thru 2004 with the same results. Is there a simple solution? Any thoughts?
    Thanks in advance.
    Jeff Sanders
     
    Jeffery_P_Sanders, Apr 2, 2004
    #1
  2. Got code?

    Matt

     
    Matt Stachoni, Apr 2, 2004
    #2
  3. Jeffery_P_Sanders

    JPSanders Guest

    The code is fine. The registry is being modified.

    I've recently discovered two things:

    1. If you write to the registry and immediately exit AutoCAD the registry will be updated.

    2. If you write to the registry and then open a new drawing before closing AutoCAD, the registry will not be updated.

    I thought AutoCAD read the registry when starting up and stored the information in memory. When starting a new drawing it would get the values from memory. This makes sense. This explains the reason why AutoCAD ignores registry changes until after a restart. But, this does not explain the disappearance of registry changes.

    Anyone have a grip on this issue?

    Jeff Sanders
     
    JPSanders, Apr 7, 2004
    #3
  4. 2. If you write to the registry and then open a new drawing before closing AutoCAD, the registry will not be updated.

    That's weird - vl-registry-write makes immediate modifications to my
    Registry...(A2K2).

    Test it with this command utility:

    (defun c:regtest ()
    (vl-registry-write
    "HKEY_CURRENT_USER\\Software\\ZZ_MYAPP"
    "ZZ_VALUE"
    "MyData"
    )
    )

    While AutoCAD is open, run Regedit and navigate to the HKCU\Software key. In
    AutoCAD, run REGTEST, and in the Registry Editor hit F5 to refresh it. You
    should see the ZZ_MYAPP key with the value ZZ_MYVALUE = "MyData."

    Matt

     
    Matt Stachoni, Apr 7, 2004
    #4
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.