| Author |
Message |
swu
Guest
|
Posted:
Tue Mar 29, 2005 7:59 pm Post subject:
Get installation path from vb.net |
|
|
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.
|
|
| Back to top |
|
 |
Mike Tuersley
Guest
|
Posted:
Tue Mar 29, 2005 8:42 pm Post subject:
Re: Get installation path from vb.net |
|
|
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... |
|
| Back to top |
|
 |
Frank Oquendo
Guest
|
Posted:
Tue Mar 29, 2005 9:12 pm Post subject:
Re: Get installation path from vb.net |
|
|
swu wrote:
| Quote: | Would it be possible to extract the installed path from autocad from vb.net without opening an autocad session?
|
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.
|
|
| Back to top |
|
 |
Tony Tanzillo
Guest
|
Posted:
Tue Mar 29, 2005 9:40 pm Post subject:
Re: Get installation path from vb.net |
|
|
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
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com
"swu" <nospam@address.withheld> wrote in message news:920485.1112108388369.JavaMail.jive@jiveforum2.autodesk.com...
| Quote: | 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. |
|
|
| Back to top |
|
 |
swu
Guest
|
Posted:
Wed Mar 30, 2005 1:43 am Post subject:
Re: Get installation path from vb.net |
|
|
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! |
|
| Back to top |
|
 |
|
|
|
|