.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Undo always load assembly

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
dirk8V5QM
487 Views, 9 Replies

Undo always load assembly

I've written a plugin, modified my registery entry so that AutoCAD attempts to load it on startup.

I'm always greeted with a popup "Do you trust this assembly?" with 3 buttons: always load, load once and don't load.

I have now miss-clicked on "always load" and I'd like to undo this choice, but I can't seem to find where.
I do not wish to plugin to always load whenever I start auto-cad

 

Any pointers?

9 REPLIES 9
Message 2 of 10

If you don't want your app to load at startup, you can remove the registry entry for the application.

 


@dirk8V5QM wrote:

I've written a plugin, modified my registery entry so that AutoCAD attempts to load it on startup.

I'm always greeted with a popup "Do you trust this assembly?" with 3 buttons: always load, load once and don't load.

I have now miss-clicked on "always load" and I'd like to undo this choice, but I can't seem to find where.
I do not wish to plugin to always load whenever I start auto-cad

 

Any pointers?


 

Message 3 of 10
dirk8V5QM
in reply to: dirk8V5QM

Yea, but then I can't load my plugin anymore 🙂

@ActivistInvestor Thanks for your reply,
but I want to go back to the original behavior:

Load my plugin at startup, but give me the prompt whether to load it always, load it once or do not load it.
Deleting the registry entries and re-adding them doesn't help.
AutoCAD still somehow knows that I pressed "Always load" for that particular plugin

Message 4 of 10

Try changing the .DLL's filename and see if you are prompted again.

Message 5 of 10
Ed.Jobe
in reply to: dirk8V5QM


@dirk8V5QM wrote:

Yea, but then I can't load my plugin anymore 🙂


When you added the registry entry, did you set LOADCTRLS to 2, which is demand loading when a command is called? If you set it to 0, it tries to load at startup, hence you get the dialog. To load using demand loading, create a cuix that has the commands within your dll and set LOADCTRLS to 2. Then when you click on a button for a command, the dll will be loaded at that time, not at startup.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 6 of 10

Yea, this might've worked (didn't try it) because having to change DLL names everytime isn't really an option either.

I ended up resetting my AutoCAD to default settings, that did the trick as well.

Shame they don't have some easier way to reset the security prompts 😕

Message 7 of 10
dirk8V5QM
in reply to: Ed.Jobe

My LOADCTRLS value has always been set to 2 and it has always attempted to loaded my plugin on startup 🙂


Message 8 of 10
Ed.Jobe
in reply to: dirk8V5QM


@dirk8V5QM wrote:

My LOADCTRLS value has always been set to 2 and it has always attempted to loaded my plugin on startup 🙂



How do you NETLOAD it? Is it in a bundle? I only load it via a cuix.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 9 of 10
dirk8V5QM
in reply to: Ed.Jobe

I don't.

The only things I've done is adding the registry settings and then AutoCAD would prompt me with the "load always, load once, don't load" prompt for the DLL.

I'd set the path to the DLL to the bin folder of my visual studio build output and it just works 😅

This is probably not the recommended way, but for fiddling around purposes it has served me well.

Message 10 of 10
Ed.Jobe
in reply to: dirk8V5QM

You can use the registry. It's a manual method that always works. Personally, I use that because I have developed a custom application for distributing my dll's. It was necessary before bundle technology was developed. I just stuck with it. For plugins that are not used in my company, I use bundles. Just create a bundle folder in your VS project and then change the Release folder to the bundle's \Contents folder. When you build, your bundle will be complete. Add the whole bundle to your project and you can keep your PackageContents.xml updated easier. The quid needs to be updated each time you update your dll. This is for version control.

 

For updating the registry, you can use the code below to create a dos bat file. Save the code to Notepad and change the extension to bat. Double click to run it.

 


rem ========== Set up for CadMgr Utilities ============
XCOPY "\\ShareName\files\AcadCustom - 2021" "C:\AcadCustom\" /q /s /y
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AutoCAD\R24.2\ACAD-6101\Applications\TID_Startup" /v "DESCRIPTION" /t REG_SZ /d "Loads TID customizations at startup for AutoCAD" /f
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AutoCAD\R24.2\ACAD-6101\Applications\TID_Startup" /v "LOADCTRLS" /t REG_DWORD /d 2 /f
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AutoCAD\R24.2\ACAD-6101\Applications\TID_Startup" /v "LOADER" /t REG_SZ /d "C:\AcadCustom\Support_GS\TID_Startup.dll" /f
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AutoCAD\R24.2\ACAD-6101\Applications\TID_Startup" /v "MANAGED" /t REG_DWORD /d 1 /f

 

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

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

Post to forums  

Forma Design Contest


AutoCAD Beta