Visual LISP, AutoLISP and General Customization
Showing results for 
Show  only  | Search instead for 
Did you mean: 

permissions to execute lisp code

Message 1 of 9
1194 Views, 8 Replies

permissions to execute lisp code

I have a problem that seems to become serious with Windows 10 permissions.
A few days ago I posted a request about writing to the HKEY_LOCAL_MACHINE registry (see this post).
Now even a copy of files from one directory to another does not seem to work.

(setq MyAppIns (vl-registry-read "HKEY_LOCAL_MACHINE\\SOFTWARE\\MyApp\\R17.2\\ACAD-7001:40C" "InstallPath"))
(setq AcadIns (vl-registry-read "HKEY_LOCAL_MACHINE\\SOFTWARE\\Autodesk\\AutoCAD\\R17.2\\ACAD-7001:40C" "AcadLocation"))
(dos_copy (strcat MyAppIns "\\Support\\Myapp.arx") (strcat AcadIns "\\Support\\Myapp.arx"))

this code returns nil.

Is it also a problem of rights and permissions or is it another problem? I would like to know first if all the users under windows 10 have the same problem as me. Thanks for your help


Message 2 of 9
in reply to: caoiatmarrakech

@caoiatmarrakech  hi,


the security in windows 10 is rasied comparing to windows 7 you must have administrator premission to write to registry.


right click autocad shortcut and select "run as administrator", run your lisp, does this solve your problem?

if it is, than your user account does not have the enough premissions.

if you are a member of local (domain) network? than the administrator of the server can raise your account premissions.




Message 3 of 9
in reply to: caoiatmarrakech

Are you sure your registry key is correct? My release 17 AutoCAD is under R21.0 in the registry.

Message 4 of 9
in reply to: jwhite

Good point.

Rather than assuming what the registry correct path is for any AutoCAD installation, one should use the (vlax-product-key) function.

John F. Uhden

Message 5 of 9
in reply to: Moshe-A

Hi Moshe-A
Thanks for your answer.
I am not a member of a network.
I had an emergency relocation, I will try as soon as possible.
I hope that would solve the problem. thank you so much
Message 6 of 9
in reply to: jwhite

Hi jwhite

It's AutoCAD 2009


Message 7 of 9


thanks for this information.


Message 8 of 9
in reply to: caoiatmarrakech



If you want to be able to write in HKEY_LOCAL_MACHINE and/or write in some protected folders (as C:\Program Files) your program have to run with adimistrator permissions.

You can do this with an installer or an exe with an application manifest to be able to set the execution level of the request to require an administrator account. But, as far as I know, this is not possible with AutoLISP.


If your request is about deployment, you would have a look at the Autoloader mechanism.

Gilles Chanteau
Programmation AutoCAD LISP/.NET

Message 9 of 9
in reply to: _gile


Thanks for your help.

I will have to take advantage of this link 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums