I've been using a method for a few years now called SHELL4 for starting a DOS application and waiting for it to finish, and then continuing with an AutoLISP function. It requires that you modify your Acad.pgp file and insert the following line below the SHELL command.
SHELL4, , 4,*OS Command: ,
I hate asking people to modify their Acad.pgp file for these AutoLISP programs to run, and I really don't want to ask them to load DOS-LIB into their library. Is there a method now included with AutoCAD that does the same thing that I may have overlooked?
Note: The first function, OpenNotepad-1, only works if you include the SHELL4 line in your Acad.pgp file. The second function, OpenNotepad-2, looks like it should work but doesn't. I gave up on this concept a long while back. The startapp function doesn't pause to return a result back to AutoLISP.
(defun c:OpenNotepad-1 (/ FileName% Text$)
(if (not (findfile "C:\\Temp\\Temp.txt"))
(vl-mkdir "C:\\Temp")
);if
(setq FileName% (open "C:\\Temp\\Temp.txt" "w"))
(write-line "Erase this line. Type your message then save and exit." FileName%)
(close FileName%)
(command "SHELL4" "Notepad C:\\Temp\\Temp.txt")
(setq FileName% (open "C:\\Temp\\Temp.txt" "r"))
(setq Text$ (read-line FileName%))
(close FileName%)
(alert (strcat "You typed the message:\n" Text$))
(princ)
);defun c:OpenNotepad-1
(defun c:OpenNotepad-2 (/ FileName% Text$)
(if (not (findfile "C:\\Temp\\Temp.txt"))
(vl-mkdir "C:\\Temp")
);if
(setq FileName% (open "C:\\Temp\\Temp.txt" "w"))
(write-line "Erase this line. Type your message then save and exit." FileName%)
(close FileName%)
(startapp "Notepad C:\\Temp\\Temp.txt")
(setq FileName% (open "C:\\Temp\\Temp.txt" "r"))
(setq Text$ (read-line FileName%))
(close FileName%)
(alert (strcat "You typed the message:\n" Text$))
(princ)
);defun c:OpenNotepad-2