Get installation path from vb.net

Discussion in 'AutoCAD' started by swu, Mar 29, 2005.

  1. swu

    swu Guest

    Would it be possible to extract the installed path from autocad from vb.net without opening an autocad session?

    I am a vb.net noobie, any feedback, examples would be appreciated.

    Thanks in advance.
     
    swu, Mar 29, 2005
    #1
  2. For what purpose? Depending on the purpose, there could be a better way but
    for now you can read it from the registry

    -- Mike
    ___________________________
    Mike Tuersley
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Mar 29, 2005
    #2
  3. Use the Microsoft.Win32 namespace. In it, you will find the Registry
    class. Examine HKLM\Software\Autodesk\AutoCAD.

    There will be one subkey for each major version of AutoCAD (2005, 2006,
    etc.). Each of version subkey will contain one subkey for each installed
    product (AutoCAD, AutoCAD E, AutoCAD M, etc.).

    Each product subkey will contain a Location value which points to the
    location of ACAD.EXE.
     
    Frank Oquendo, Mar 29, 2005
    #3
  4. Without AutoCAD running, and assuming that there may be
    more than one release of any number of AutoCAD based
    products, you can get the location of the one that will be
    started if you double click on a .DWG file, from the registry.

    First read this key:

    HKEY_CLASSES_ROOT\AutoCAD.Drawing\CurVer

    Take the value from the above key, and replace the
    %curver% in the following key with it, and then read
    that key to get the actual location of Acad.exe.

    HKEY_CLASSES_ROOT\%curver%\protocol\StdFileEditing\server
     
    Tony Tanzillo, Mar 29, 2005
    #4
  5. swu

    swu Guest

    Thanks for the advice, that will get me started in the right direction.

    Can anyone recommend some general vb.net discussion groups for vb questions not related to autocad?

    Thanks again!
     
    swu, Mar 29, 2005
    #5
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.