Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Launch EXE from LISP when LISP and EXE file at the same folder

1 REPLY 1
Reply
Message 1 of 2
alexborodulin1
1448 Views, 1 Reply

Launch EXE from LISP when LISP and EXE file at the same folder

How to modify LISP

 

(defun c:W55()(startapp "D:/My Application1/Application1.exe"))

 

to work, if location of folder

 

D:/My Application1

 

unknown (any location defined by user, not necessary located in AutoCAD File Search Path), but both LISP and exe files are located in the same folder?

 

Thank you,

Alex

1 REPLY 1
Message 2 of 2

Alex,

 

Do you use an installer for your application?

 

If you do you may be able to create a key in the registry. This is what I do for my application.

 

The application key is created under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\CadTempo.exe

 

(the Wow6432Node indicates it is a 32 bit application running in a 64 bit machine)

 

Under this key is the "default value" of H:\Program Files\CadTempo\CadTempo.exe and the "Path" value of H:\Program Files\CadTempo\CadTempo which reflects the location that the user selected during install.

 

Then, in AutoCAD the application will start up with just the name of the application without the need to include the path. So the lisp helper looks like this:

 

(defun c:CTD ()

  (command "start" "cadtempo d")

)

 

In my case my application accepts command line parameters - as shown, the d tells the program to display the timer.

 

 

Patrick Hughes

Engineered Design Solutions
Developer of CadTempo - Cad Time Tracking
www.cadtempo.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost