Demand loading requiring ACAD.exe Admin rights (.Net Framework version?)

Demand loading requiring ACAD.exe Admin rights (.Net Framework version?)

SRSDS
Advisor Advisor
698 Views
4 Replies
Message 1 of 5

Demand loading requiring ACAD.exe Admin rights (.Net Framework version?)

SRSDS
Advisor
Advisor

I'm going to put this out there before testing my suspicion.

 

I have two apps which both have demand load entries.

 

One loads on users computers while the other doesn't to unless I start acad.exe with admin rights.

I can only think that the one that works is uses .NET 4.0 while the other is set to .NET 4.6.1.

 

The coding for demand loading is a copy and paste.

 

Could the .Net Framework version have any effect on the user's permissions in accessing the registry?

 

It's  also something to do with user permissions granted.

If I log onto the users computer as myself it loads.

I don't know how to give the users the necessary permissions .

 

 

0 Likes
Accepted solutions (1)
699 Views
4 Replies
Replies (4)
Message 2 of 5

_gile
Consultant
Consultant

Hi,

I do not think it's due to the Framework version, but to be sure you can just try it with a new DLL compiled against a different Framework.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 3 of 5

dgorsman
Consultant
Consultant

For clarification - are you setting demand-load registry settings when the DLL is loaded?  If so, it needs to be done with proper permissions to modify the registry.  One of the reasons I don't follow the online examples of doing so - it doesn't work if the user has restricted permissions. 

 

You might get around it by separating out the code to do into a different module, one that can be securely run with elevated permissions once during an install operation.  I normally use a REG file and basic scripting for this.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes
Message 4 of 5

antonio.leonardo
Advocate
Advocate

Hi @SRSDS,

 

Is not been clarified 100% your requirements for me, but as I read your post, some routine of your code has problems to admin rights and modifie windows registry; if is the problem, independly of .NET Version, think about use Impersonation concept under your rotine; in other words, encapsulate your program flow inner Impersonator code, the developer does not have to worry about giving permissions for each user that consumes the app.

 

This tutorial by Wayne Ye having an explanation about Impersonation scenarios and code example, this helps me.

 

Att,

Antonio Leonardo.

exam-483-programming-in-c.png

0 Likes
Message 5 of 5

SRSDS
Advisor
Advisor
Accepted solution

I apologize for not answering this earlier. Probably good because I would have been wasting peoples time which has already occurred. I only discovered this a day or so ago.

 

Turns out to be a problem with a third party program which encryptions files (Gemalto Sentinel LDK HASP).

The current version 7.9 does't work and I needed to revert to 7.6.

 

Very confusing because it was working on some computers and not others.

 

0 Likes