;;; Serial Number and Date Check
;;; Combined from existing subroutines and modified by Igal Averbuh 2016

(defun c:sr()
(setq run (getvar "_pkser"))
(if (or (= run "392-67763891")(= run "392-67763892")) ;Change to the serial numbers you wanted.
(princ "\nSecurity check passed")
(progn
(princ "\nYou have tried to run XYZ SOFTWARE on a non authorised machine")
(princ "\nPlease contact me on 1234567 and I will rip your arms off")
)
)
(setq lastday 20180508.0) ;Change to the date you wanted. Now the date is 05.08.2018
(print "Checking date ... ")
(if (> (getvar "CDATE") lastday)
(progn
(princ "This program has expired.")
(quit)
)
(progn
(princ (strcat "You've still got " (itoa (fix (- lastday (getvar "CDATE")))) " day(s) to run this program ... "))
)
)
(princ "Program loaded.")

;; Continue with the rest of the code
(princ)
)
(c:sr)
;;;-----------------------------------------------------------------

Advertisements