permissions to execute lisp code

Anonymous
1,834 Views
8 Replies
Message 1 of 9

permissions to execute lisp code

Anonymous
Not applicable
Hi
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

 

0 Likes
Accepted solutions (1)
1,835 Views
8 Replies
Replies (8)
Message 2 of 9

Moshe-A
Mentor
Mentor

@Anonymous  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.

 

moshe

 

0 Likes
Message 3 of 9

jwhite
Advocate
Advocate

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

0 Likes
Message 4 of 9

john.uhden
Mentor
Mentor

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

0 Likes
Message 5 of 9

Anonymous
Not applicable
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
0 Likes
Message 6 of 9

Anonymous
Not applicable

Hi jwhite

It's AutoCAD 2009

Thanks

0 Likes
Message 7 of 9

Anonymous
Not applicable

Hi

thanks for this information.

 

0 Likes
Message 8 of 9

_gile
Consultant
Consultant
Accepted solution

Hi,

 

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
GileCAD
GitHub

0 Likes
Message 9 of 9

Anonymous
Not applicable

Hi

Thanks for your help.

I will have to take advantage of this link 

0 Likes