Author Topic: autocad location  (Read 3271 times)

0 Members and 1 Guest are viewing this topic.

civil.eng

  • Newt
  • Posts: 66
autocad location
« on: April 22, 2020, 01:39:08 AM »
Hi all,
in a project with inno setup I need to get Acad.exe installed location. I tried with FileSearch but it doesn't work, I know we can find the path with windows registry, does anyone have information about it?

BIGAL

  • Swamp Rat
  • Posts: 1398
  • 40 + years of using Autocad
Re: autocad location
« Reply #1 on: April 22, 2020, 01:50:18 AM »
Just look at the toolbar icon properties on the desktop for the location.
A man who never made a mistake never made anything

civil.eng

  • Newt
  • Posts: 66
Re: autocad location
« Reply #2 on: April 22, 2020, 05:00:43 AM »
Your way work only on my system, What about the other systems? I need to find location with any version of autocad and windows in inno setup.

Dlanor

  • Bull Frog
  • Posts: 263
Re: autocad location
« Reply #3 on: April 22, 2020, 07:04:51 AM »
Try

Code - Auto/Visual Lisp: [Select]
  1. (findfile "acad.exe")

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: autocad location
« Reply #4 on: April 22, 2020, 01:05:11 PM »
Start digging from here:
HKEY_CLASSES_ROOT\.dwg

civil.eng

  • Newt
  • Posts: 66
Re: autocad location
« Reply #5 on: April 22, 2020, 06:37:28 PM »
Try

Code - Auto/Visual Lisp: [Select]
  1. (findfile "acad.exe")

This is not a logical solution,because FindFile method will search all file of system, while I think we can extract it from registry windows easily,

Dlanor

  • Bull Frog
  • Posts: 263
Re: autocad location
« Reply #6 on: April 22, 2020, 07:06:51 PM »
Try

Code - Auto/Visual Lisp: [Select]
  1. (findfile "acad.exe")

This is not a logical solution,because FindFile method will search all file of system, while I think we can extract it from registry windows easily,

It's perfectly logical. AutoCAD knows where it is installed, and findfile will only search in the current AutoCAD search paths, one of which will be where it is installed.

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: autocad location
« Reply #7 on: April 22, 2020, 08:17:05 PM »
There is a registry key under HKLM which has the install location, you just need to look for it.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: autocad location
« Reply #8 on: April 22, 2020, 09:04:13 PM »
EmiCad has a utility that runs from Innosetup, and ask user which instance on CAD to install for.  Works for both A AD and BricsCad.  I can get you details tomorrow, I use it very successfully.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: autocad location
« Reply #9 on: April 22, 2020, 09:44:30 PM »
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Re: autocad location
« Reply #10 on: April 22, 2020, 10:08:48 PM »
Please note that amir0914 is using inno setup; not AutoCAD/Autolisp.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

MickD

  • King Gator
  • Posts: 3619
  • (x-in)->[process]->(y-out) ... simples!
"Short cuts make long delays,' argued Pippin.”
J.R.R. Tolkien

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: autocad location
« Reply #12 on: April 23, 2020, 09:43:44 AM »
Please note that amir0914 is using inno setup; not AutoCAD/Autolisp.

Ahhh. Apologies to Amir. Findfile is the wrong tool outside AutoCAD; inside AutoCAD it would be totally legit.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Dlanor

  • Bull Frog
  • Posts: 263
Re: autocad location
« Reply #13 on: April 23, 2020, 01:42:07 PM »
Please note that amir0914 is using inno setup; not AutoCAD/Autolisp.

Oops. My apologies. :opps: