In the registry its easy (setenv & (getenv. (setq alancnt (getenv "xyzabc"))
You just need to work out how to do the 1st go and set the Reg variable.
Ok better ways is read USB serial number, read Hard disk ID, read IP address. If your supplying usb then you know its serial number. So copy the software to say hard disk will make it not work.
(defun UsbDriveSerialNumber ( / fso dr)
(setq fso (vlax-create-object "Scripting.FileSystemObject"))
(vlax-for d (vlax-get fso 'Drives)
(if
(= (Vlax-get d 'DriveType) 2)
(setq dr (cons (list (vla-get-path d) (vla-get-SerialNumber d)) dr)
)
)
)
(vlax-release-object fso)
(reverse dr)
)
(UsbDriveSerialNumber)
You can process multiple lisp files to FAS in one go. Post if need code.
Ok a hint for multiple files is using a bat file you can
copy passwordfile.lsp+yourlisp1.lsp c:\\myfasfiles\yourlisp1.lsp
This allows you to make a tiny lisp that has the test in it and the copy command adds it to the top of the new lisp file., which you compile to fas. This way you can test the code without the security check.
Used on 130 files in one go.