这应该得到所有ProgID的列表
- (defun GetProgIDs ( / *error* regPath file id ofile lst )
- (vl-load-com)
- ;; Lee Mac ~ 17.02.10
- (defun *error* ( msg )
- (and ofile (close ofile))
- (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
- (princ (strcat "\n** Error: " msg " **")))
- (princ)
- )
- (if (setq file (getfiled "Output" "" "txt" 1))
- (progn
-
- (foreach desc (vl-registry-descendents
- (setq regPath "HKEY_CLASSES_ROOT\\CLSID"))
- (if (setq id (vl-registry-read
- (strcat regPath "\" desc "\\ProgId")))
-
- (setq lst (cons (vl-princ-to-string id) lst))
- )
- )
- (setq ofile (open file "w"))
-
- (mapcar '(lambda ( x ) (write-line x ofile)) (acad_strlsort lst))
-
- (setq ofile (close ofile))
- )
- )
- (princ)
- )
|