AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

Would you like to be able to access the Registry using Visual Lisp?
Try this :

;CODING STARTS HERE
(defun C:RegTest ( / AcadReg LMAcadReg Name1 Name2)

(vl-load-com)

(setq AcadReg (vlax-product-key)
LMAcadReg (strcat "HKEY_LOCAL_MACHINE\\" AcadReg)
Name1 (vl-registry-read LMAcadReg "FirstName")
Name2 (vl-registry-read LMAcadReg "LastName")
);setq

(alert (strcat "The name of this computer is " Name1 " " Name2))

(princ)

);defun

(princ)
;CODING ENDS HERE

Thanks to Bill Kramer for this little beauty.

The AutoLisp/Visual Lisp/VBA Resource Website

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website