- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to secure a .FAS program from being used by anyone outside my client's company.
I checked out the OS environment and found that their USERDOMAIN appeared unique, e.g. "COMPANY.COM"
So,
(if (/= (getenv "USERDOMAIN") "COMPANY.COM")(exit))
But then I thought, what if some psychic pirate wanted to make it run on his own PC?
He could use setenv to create the registry key.
But without some FSO trickery he can't change an OS setting, right?
Well, no he can't, but AutoCAD allows a registry key to be named the same as an OS variable. And AutoCAD looks to its own registry entries first.
So someone could (setenv "USERDOMAIN" "COMPANY.COM") and the program would run.
IMO, AutoCAD should must not allow this to happen.
Yes, I know that this scenario is leptokurtotic (I know the word 'cause a good sailing friend named his E-Scow "Leptokurtosis." He had a PhD in statistics. He explained it to me as "the odds of extreme events happening," like his ever winning a race. <yuk yuk> Barnegat Bay has and has had some world class sailors, but Doug was not one of them.)
Should I stick with the odds and stop worrying?
Well, I guess I could include checking the AutoCAD registry and vla-registry-delete the entry. It would be a deterent at least. Hmm, I could perform the check/delete before getenv. Did I answer my own question?
John F. Uhden
Solved! Go to Solution.