Here is a little something we use to verify that support paths are present:
;;; Adds specified directory to support path
;;; Example: (addsupppath "C:\\Temp")
;;; Returns: msg
;;; Requires: str->lst function from (toolbox)
(defun addsupppath (dir / prefobj supppath supplst newsupp msg)
(setq prefobj (vla-get-preferences (vlax-get-acad-object))
supppath (vla-get-SupportPath (vla-get-files prefobj))
supplst (str->lst (strcase supppath) ";")
)
(if (not (member (strcase dir) supplst))
(progn (setq newsupp (strcat supppath ";" dir)
msg (strcat "\n" dir " added to AutoCAD Support Path"))
(vla-put-SupportPath (vla-get-files prefobj) newsupp)
)
(setq msg (strcat "\n" dir " exists within AutoCAD Support Path"))
)
(vlax-Release-Object prefobj)
(if msg (princ msg))
(princ)
)
;;;*******************************************************************************************
;;; FUNCTION: STR->LST
;;; DESCRIPTION: Converts delimited string to list
;;; ARGS: delimited string
;;; EXAMPLE: (STR->LST "test1,test2,test3,test4" ",")
;;; RETURNS: ("test1" "test2" "test3" "test4")
;;;*******************************************************************************************
(defun str->lst (str delim / lst pos)
(setq pos (vl-string-search delim str))
(while pos
(setq lst (cons (substr str 1 pos) lst)
str (substr str (+ pos 2))
pos (vl-string-search delim str))
) ; end while
(if (> (strlen str) 0)(setq lst (cons str lst)))
(reverse lst)
)