Get installation path from vb.net
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Get installation path from vb.net

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
swu
Guest





Posted: Tue Mar 29, 2005 7:59 pm    Post subject: Get installation path from vb.net Reply with 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
Mike Tuersley
Guest





Posted: Tue Mar 29, 2005 8:42 pm    Post subject: Re: Get installation path from vb.net Reply with quote

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 Reply with quote

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 Reply with quote

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 Reply with quote

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
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB